Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
weil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Herbers, Maik
weil
Commits
47df24dd
Verified
Commit
47df24dd
authored
2 years ago
by
Herbers, Maik
Browse files
Options
Downloads
Patches
Plain Diff
weil: Add command `DS-info'.
* src/weil.cpp (ds_info): New function.
parent
69496392
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/weil.cpp
+27
-0
27 additions, 0 deletions
src/weil.cpp
with
27 additions
and
0 deletions
src/weil.cpp
+
27
−
0
View file @
47df24dd
...
@@ -26,6 +26,8 @@ print_help(bool error)
...
@@ -26,6 +26,8 @@ print_help(bool error)
"
\t
weil [options] <command> [arguments]
\n
"
"
\t
weil [options] <command> [arguments]
\n
"
"
\n
"
"
\n
"
"Commands:
\n
"
"Commands:
\n
"
" DS-info <file> output some information about the discriminant form associated
\n
"
" to the gram matrix in `file'
\n
"
" DS-c-kernel <file> <c> compute `D_c' where `D' is the discriminant form associated
\n
"
" DS-c-kernel <file> <c> compute `D_c' where `D' is the discriminant form associated
\n
"
" to the gram matrix in `file'
\n
"
" to the gram matrix in `file'
\n
"
" DS-c-image <file> <c> compute `D^c' where `D' is the discriminant form associated
\n
"
" DS-c-image <file> <c> compute `D^c' where `D' is the discriminant form associated
\n
"
...
@@ -470,6 +472,29 @@ transformation_matrix(int argc, const char** argv, weil::IOFormat style)
...
@@ -470,6 +472,29 @@ transformation_matrix(int argc, const char** argv, weil::IOFormat style)
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
}
int
ds_info
(
int
argc
,
const
char
**
argv
,
weil
::
IOFormat
style
)
{
// FIXME: merge with DS-get-orbits?
(
void
)
style
;
if
(
argc
!=
1
)
{
return
print_help
(
true
);
}
auto
m
{
read_square_mpz_matrix
(
argv
[
0
])
};
if
(
!
m
)
{
return
EXIT_FAILURE
;
}
weil
::
DiscriminantForm
D
{
*
m
};
std
::
cout
<<
"cardinality: "
<<
D
.
cardinality
<<
"
\n
"
;
std
::
cout
<<
"level: "
<<
D
.
level
()
<<
"
\n
"
;
return
EXIT_SUCCESS
;
}
int
int
main
(
int
argc
,
const
char
**
argv
)
main
(
int
argc
,
const
char
**
argv
)
{
{
...
@@ -523,6 +548,8 @@ main(int argc, const char** argv)
...
@@ -523,6 +548,8 @@ main(int argc, const char** argv)
}
}
};
};
check_option
(
"DS-info"
,
ds_info
);
#define ds_c_action(action_type) \
#define ds_c_action(action_type) \
[]<typename... Ts>(Ts... args) { \
[]<typename... Ts>(Ts... args) { \
return ds_c_action_common( \
return ds_c_action_common( \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment