The ChainCon Software (Release 0.03)
atmodcub.cpp
Go to the documentation of this file.
1
/////////////////////////////////////////////////////////////////////////////
2
///
3
/// \file
4
///
5
/// A program for the computation of cubical
6
/// algebraic topological model.
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: October 21, 2013.
27
28
29
// include the string hashing definitions (before including "hashsets.h")
30
#include "
chaincon/stringhash.h
"
31
32
// include selected header files from the CHomP library
33
#include "chomp/system/config.h"
34
#include "chomp/struct/hashsets.h"
35
36
// include relevant local header files
37
#include "
chaincon/cubcell.h
"
38
#include "
chaincon/emptycell.h
"
39
#include "
chaincon/wrapping.h
"
40
#define SPACE_WRAPPING
41
#include "
atmodmain.h
"
42
43
44
// --------------------------------------------------
45
// -------------------- OVERTURE --------------------
46
// --------------------------------------------------
47
48
/// The title of the program and licensing information.
49
const
char
*
title
=
"\
50
Cubical homology computation with an algebraic topological model.\n\
51
Version 0.05 (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 cubical homology groups and homology generators.\n\
57
The ring of coefficients is Z or Z_p (the integers modulo prime number p).\n\
58
Call with:\n\
59
filename - the name of a file that contains a list of cubical cells,\n\
60
Switches and additional arguments:\n\
61
filename2 - the name of an additional file for relative (co)homology;\n\
62
-pN - selection of the coefficients: p=0 for Z, p=1 for purely\n\
63
\tcombinatorial procedures, p > 1 for Z_p (default: p=1); use p <= 181,\n\
64
-r - compute reduced homology (with the empty set as a cell of dim -1),\n\
65
-b - don't add boundary cells (use -bx and -ba for X and A selectively),\n\
66
-w N1,..,Nk - set space wrapping, a.k.a. periodic boundary conditions;\n\
67
\trepeat the n-tuple for each dimension n; use 0 for no wrapping,\n\
68
-dpi, -dincl, -dphi - display the computed maps: pi, incl, phi,\n\
69
-drepr - display homology representants (meaningful for -aN with N < 3),\n\
70
-aN - homology algorithm: 0 = old (very slow), 1 = new without additional\n\
71
optimization (relatively fast), 2 = new (default), 3,4 = using the SNF,\n\
72
--verify - do additional verification of the computed maps,\n\
73
--log filename - save the output to a file (without progress indicators),\n\
74
--quiet - suppress data output to the screen (whcih can be still logged),\n\
75
--help - display this brief help information only and exit.\n\
76
For more information please consult the accompanying documentation\n\
77
or ask the program's author at http://www.PawelPilarczyk.com/."
;
78
79
80
// --------------------------------------------------
81
// ---------------------- main ----------------------
82
// --------------------------------------------------
83
84
/// The main procedure of the program.
85
/// Returns: 0 = Ok, -1 = Error, 1 = Help displayed, 2 = Wrong arguments.
86
int
main
(
int
argc,
char
*argv [])
87
{
88
return
atModelMain<tCubCell<int_t,SettableWrapping<int_t>,
89
SettableEmptyCell
> > (argc, argv,
title
,
helpinfo
);
90
}
/* main */
91
helpinfo
const char * helpinfo
Brief help information on the program's usage.
Definition:
atmodcub.cpp:55
main
int main(int argc, char *argv [])
The main procedure of the program.
Definition:
atmodcub.cpp:86
wrapping.h
Tools for coordinate wrapping, a.k.a.
cubcell.h
A cubical cell.
atmodmain.h
The main procedure for a program for the computation of an algebraic topological model.
stringhash.h
Hashing keys for std::string.
emptycell.h
The decision on whether the empty cell should be used as a valid cell of dimension -1...
SettableEmptyCell
An empty cell existence decision class with settable global flag.
Definition:
emptycell.h:70
title
const char * title
The title of the program and licensing information.
Definition:
atmodcub.cpp:49
Generated on Tue Jan 16 2018 22:49:02 for The ChainCon Software (Release 0.03) by
1.8.13