The ChainCon Software (Release 0.03)
ssqcub.cpp
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////////////
2 ///
3 /// \file
4 ///
5 /// A program for the computation of the Steenrod squares,
6 /// using algebraic minimal models for cubical sets
7 /// and the direct formula by Marek Krcal.
8 ///
9 /////////////////////////////////////////////////////////////////////////////
10 
11 // Copyright (C) 2009-2016 by Pawel Pilarczyk.
12 //
13 // This file is part of my research software package. This is free software:
14 // you can redistribute it and/or modify it under the terms of the GNU
15 // General Public License as published by the Free Software Foundation,
16 // either version 3 of the License, or (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this software; see the file "license.txt". If not,
25 // please, see <http://www.gnu.org/licenses/>.
26 
27 // Started on July 4, 2013. Last revision: January 23, 2015.
28 
29 
30 // the choice of cubes or simplices
31 #ifndef CUBES_NOT_SIMPLICES
32 #define CUBES_NOT_SIMPLICES 1
33 #endif
34 
35 // do not use the direct formula by Marek Krcal for cubes
36 #ifndef DIRECT_CUBICAL_FORMULA
37 #define DIRECT_CUBICAL_FORMULA 1
38 #endif
39 
40 // include some standard C++ header files
41 #include <istream>
42 #include <ostream>
43 #include <string>
44 
45 // include the string hashing definitions (before including "hashsets.h")
46 #include "chaincon/stringhash.h"
47 
48 // include selected header files from the CHomP library
49 #include "chomp/system/config.h"
50 #include "chomp/struct/hashsets.h"
51 
52 // include relevant local header files
53 #include "chaincon/ssquarescub.h"
54 #include "ssqmain.h"
55 
56 
57 // --------------------------------------------------
58 // -------------------- OVERTURE --------------------
59 // --------------------------------------------------
60 
61 /// The title of the program and licensing information.
62 const char *title = "\
63 Computation of Steenrod squares using an Algebraic Minimal Model.\n\
64 Version 0.01 (Feb 6, 2016). Copyright (C) 1997-2016 by Pawel Pilarczyk.\n\
65 This is free software. No warranty. Consult 'license.txt' for details.";
66 
67 /// Brief help information on the program's usage.
68 const char *helpinfo = "\
69 This program computes and displays all the non-zero Steenrod squares\n\
70 of a cubical set. The program uses a formula introduced by Marek Krcal\n\
71 for a cubical complex, without subdivision into a simplicial set.\n\
72 Note that the ring of coefficients is fixed to Z_2.\n\
73 Call with:\n\
74 filename - the name of a file that contains a list of cells for the test,\n\
75 Switches and additional arguments:\n\
76 filename2 - the name of an additional file for relative (co)homology;\n\
77 -r - compute reduced homology (with the empty set as a cell of dim -1),\n\
78 -b - don't add boundary cells (use -bx and -ba for X and A selectively),\n\
79 --log filename - save the output to a file (without progress indicators),\n\
80 --quiet - suppress data output to the screen (whcih can be still logged),\n\
81 --help - display this brief help information only and exit.\n\
82 For more information please consult the accompanying documentation\n\
83 or ask the program's author at http://www.PawelPilarczyk.com/.";
84 
85 
86 // --------------------------------------------------
87 // ---------------------- main ----------------------
88 // --------------------------------------------------
89 
90 /// The main procedure of the program.
91 /// Returns: 0 = Ok, -1 = Error, 1 = Help displayed, 2 = Wrong arguments.
92 int main (int argc, char *argv [])
93 {
94  return steenrodSquaresMain (argc, argv, title, helpinfo);
95 } /* main */
96 
Computation of the Steenrod squares for cubical cells.
const char * title
The title of the program and licensing information.
Definition: ssqcub.cpp:62
int main(int argc, char *argv [])
The main procedure of the program.
Definition: ssqcub.cpp:92
Hashing keys for std::string.
The main function of a program for computing the Steenrod squares of a simplicial complex or a cubica...
const char * helpinfo
Brief help information on the program&#39;s usage.
Definition: ssqcub.cpp:68
int steenrodSquaresMain(int argc, char *argv [], const char *title, const char *helpinfo)
The main procedure of the program.
Definition: ssqmain.h:267