The ChainCon Software (Release 0.03)
awdiag2dsim.cpp
Go to the documentation of this file.
1
/////////////////////////////////////////////////////////////////////////////
2
///
3
/// \file
4
///
5
/// A program for the computation of the Alexander-Whitney diagonal
6
/// for simplicial complexes.
7
///
8
/////////////////////////////////////////////////////////////////////////////
9
10
// Copyright (C) 2009-2016 by Pawel Pilarczyk.
11
//
12
// This file is part of my research software package. This is free software:
13
// you can redistribute it and/or modify it under the terms of the GNU
14
// General Public License as published by the Free Software Foundation,
15
// either version 3 of the License, or (at your option) any later version.
16
//
17
// This software is distributed in the hope that it will be useful,
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
// GNU General Public License for more details.
21
//
22
// You should have received a copy of the GNU General Public License
23
// along with this software; see the file "license.txt". If not,
24
// please, see <http://www.gnu.org/licenses/>.
25
26
// Started on March 24, 2009. Last revision: January 6, 2013.
27
28
29
// include the hashing definitions (before including "hashsets.h")
30
#include "
chaincon/stringhash.h
"
31
#include "
chaincon/pair.h
"
32
33
// include selected header files from the CHomP library
34
#include "chomp/system/config.h"
35
#include "chomp/struct/hashsets.h"
36
37
// include relevant local header files
38
#include "
chaincon/simplex.h
"
39
#include "
chaincon/emptycell.h
"
40
#include "
chaincon/awdiagsim.h
"
41
#include "
awdiag2dmain.h
"
42
43
44
// --------------------------------------------------
45
// -------------------- OVERTURE --------------------
46
// --------------------------------------------------
47
48
/// The title of the program and licensing information.
49
const
char
*
title
=
"\
50
Alexander-Whitney diagonal for simplicial complexes.\n\
51
Version 0.02 (Sep 24, 2015). Copyright (C) 1997-2016 by Pawel Pilarczyk.\n\
52
This is free software. No warranty. Consult 'license.txt' for details."
;
53
54
/// Brief help information on the program's usage.
55
const
char
*
helpinfo
=
"\
56
This program computes the Alexander-Whitney diagonal for 2-dimensional\n\
57
homology generators, and represents the result in terms of 1-dimensional\n\
58
homology genrators. In other words, this program decomposes cavities\n\
59
into products of cycles.\n\
60
The ring of coefficients is set to Z_2, the integers modulo 2.\n\
61
Call with:\n\
62
filename - the name of a file that contains a list of simplices,\n\
63
Switches and additional arguments:\n\
64
filename2 - the name of an additional file for relative homology;\n\
65
-ddiag - display the A-W diagonal of each 2D homology generator,\n\
66
-aN - homology algorithm: 0 = old (very slow), 1 = new without additional\n\
67
\toptimization (relatively fast), 2 = new (default), 3 = using the SNF.\n\
68
-r - compute reduced homology (with the empty set as a cell of dim -1),\n\
69
-b - don't add boundary cells (use -bx and -ba for X and A selectively),\n\
70
--verify - do additional verification of the computed A-W diagonal,\n\
71
--log filename - save the output to a file (without progress indicators),\n\
72
--quiet - suppress data output to the screen (whcih can be still logged),\n\
73
--help - display this brief help information only and exit.\n\
74
For more information please consult the accompanying documentation\n\
75
or ask the program's author at http://www.PawelPilarczyk.com/."
;
76
77
78
// --------------------------------------------------
79
// ---------------------- main ----------------------
80
// --------------------------------------------------
81
82
/// The main procedure of the program.
83
/// Returns: 0 = Ok, -1 = Error, 1 = Help displayed, 2 = Wrong arguments.
84
int
main
(
int
argc,
char
*argv [])
85
{
86
return
awdiag2dMain<tSimplex<int_t,SettableEmptyCell> >
87
(argc, argv,
title
,
helpinfo
);
88
}
/* main */
89
title
const char * title
The title of the program and licensing information.
Definition:
awdiag2dsim.cpp:49
main
int main(int argc, char *argv [])
The main procedure of the program.
Definition:
awdiag2dsim.cpp:84
helpinfo
const char * helpinfo
Brief help information on the program's usage.
Definition:
awdiag2dsim.cpp:55
stringhash.h
Hashing keys for std::string.
simplex.h
A simplex class with arbitrary vertices.
awdiag2dmain.h
The main procedure of a generic program for the computation of the Alexander-Whitney diagonal...
emptycell.h
The decision on whether the empty cell should be used as a valid cell of dimension -1...
pair.h
A pair of elements.
awdiagsim.h
A simplicial version of the Alexander-Whitney diagonal.
Generated on Tue Jan 16 2018 22:49:02 for The ChainCon Software (Release 0.03) by
1.8.13