34 #include "chomp/system/config.h" 35 #include "chomp/system/textfile.h" 36 #include "chomp/system/timeused.h" 37 #include "chomp/system/arg.h" 38 #include "chomp/struct/hashsets.h" 55 Alexander-Whitney diagonal for a single simplex.\n\ 56 Version 0.01 (July 2, 2013). Copyright (C) 1997-2016 by Pawel Pilarczyk.\n\ 57 This is free software. No warranty. Consult 'license.txt' for details.";
61 This program computes the Alexander-Whitney diagonal for a single cube.\n\ 63 -d N - choose the dimension of the cube.\n\ 64 Switches and additional arguments:\n\ 65 -pN - selection of the coefficients: p=0 for Z, p>1 for Z_p (default: 0);\n\ 66 \tnote: one should use p <= 181.\n\ 67 --log filename - save the output to a file (without progress indicators),\n\ 68 --quiet - suppress data output to the screen (whcih can be still logged),\n\ 69 --help - display this brief help information only and exit.\n\ 70 For more information please consult the accompanying documentation\n\ 71 or ask the program's author at http://www.PawelPilarczyk.com/.";
80 int main (
int argc,
char *argv [])
82 using namespace chomp::homology;
98 int argresult = a. analyze (argc, argv);
103 sout <<
title <<
'\n';
108 sout <<
"Call with '--help' for help.\n";
113 if ((argresult > 0) || (dim <= 0))
129 int *coord =
new int [dim + 1];
130 for (
int i = 0; i <= dim; ++ i)
132 CellT Q (dim, coord);
138 sout <<
"Combinatorial Alexander-Whitney diagonal of " <<
139 Q <<
":\n" << combDiag <<
"\n";
144 sout <<
"Alexander-Whitney diagonal over " <<
145 CoefT::ringsymbol () <<
" of " <<
146 Q <<
":\n" << diag <<
"\n";
152 catch (
const char *msg)
154 sout <<
"ERROR: " << msg <<
'\n';
157 catch (
const std::exception &e)
159 sout <<
"ERROR: " << e. what () <<
'\n';
164 sout <<
"ABORT: An unknown error occurred.\n";
Elements of the ring Z_p.
const char * title
The title of the program and licensing information.
A simplex with vertices of arbitrary type.
A tensor of chains with coefficients in an arbitrary commutative ring.
Combinatorial tensor of cells.
A combinatorial tensor (for coefficients in Z_2).
A simplex class with arbitrary vertices.
void AWdiagonal(const tCombChain< CellT > &ch, tCombTensor< CellT, CellT > &t)
Computes the Alexander-Whitney diagonal of a chain, using the procedure defined for individual cells...
The decision on whether the empty cell should be used as a valid cell of dimension -1...
const char * helpinfo
Brief help information on the program's usage.
An element of the ring Z_p, where p is globally set.
int main(int argc, char *argv [])
The main procedure of the program.
A simplicial version of the Alexander-Whitney diagonal.