The ChainCon Software (Release 0.03)
Macros | Functions | Variables
cub2sim.cpp File Reference

A program that saves a simplicial set obtained from a cubical set by means of simplicial subdivision. More...

#include "chaincon/stringhash.h"
#include "chomp/system/config.h"
#include "chomp/system/textfile.h"
#include "chomp/system/timeused.h"
#include "chomp/system/arg.h"
#include "chomp/struct/hashsets.h"
#include "chaincon/ringzp.h"
#include "chaincon/simplex.h"
#include "chaincon/cubcell.h"
#include "chaincon/emptycell.h"
#include "chaincon/wrapping.h"
#include "chaincon/prodcell.h"
#include "chaincon/cubproduct.h"

Go to the source code of this file.

Macros

#define SPACE_WRAPPING
 

Functions

template<class CellT >
void flattenProduct (const tProdCell< CellT > &prod, std::vector< CellT > &cells)
 
template<class ProdCellT , class SimCellT >
void prod2simplex (const ProdCellT &prod, SimCellT &simplex)
 
int main (int argc, char *argv [])
 The main procedure of the program. More...
 

Variables

const char * title
 The title of the program and licensing information. More...
 
const char * helpinfo
 Brief help information on the program's usage. More...
 

Detailed Description

A program that saves a simplicial set obtained from a cubical set by means of simplicial subdivision.

Definition in file cub2sim.cpp.

Macro Definition Documentation

◆ SPACE_WRAPPING

#define SPACE_WRAPPING

Definition at line 47 of file cub2sim.cpp.

Function Documentation

◆ flattenProduct()

template<class CellT >
void flattenProduct ( const tProdCell< CellT > &  prod,
std::vector< CellT > &  cells 
)

Definition at line 85 of file cub2sim.cpp.

Referenced by prod2simplex().

◆ main()

int main ( int  argc,
char *  argv[] 
)

The main procedure of the program.

Returns: 0 = Ok, -1 = Error, 1 = Help displayed, 2 = Wrong arguments.

Definition at line 135 of file cub2sim.cpp.

References cube2product(), helpinfo, prod2simplex(), and title.

◆ prod2simplex()

template<class ProdCellT , class SimCellT >
void prod2simplex ( const ProdCellT &  prod,
SimCellT &  simplex 
)
inline

Definition at line 100 of file cub2sim.cpp.

References flattenProduct().

Referenced by main().

Variable Documentation

◆ helpinfo

const char* helpinfo
Initial value:
= "\
This program saves a simplicial set obtained from a cubical set by means of\n\
simplicial subdivision, using the representation of cubical cells by means of\n\
the Cartesian product of the 2D simplices that correspond to the edges.\n\
Please, beware of the fact that this is a very inefficient way of subdividing\n\
each hypercube into the union of simplices; a much smarter algorithm\n\
is possible, but I needed this specific one to check some features.\n\
Call with:\n\
input.cub - the name of a file that contains a list of cubical cells,\n\
output.sim - the name of a file that will contain a list of simplices,\n\
Switches and additional arguments:\n\
--log filename - save the output to a file (without progress indicators),\n\
--quiet - suppress data output to the screen (whcih can be still logged),\n\
--help - display this brief help information only and exit.\n\
For more information please consult the accompanying documentation\n\
or ask the program's author at http://www.PawelPilarczyk.com/."

Brief help information on the program's usage.

Definition at line 62 of file cub2sim.cpp.

Referenced by main().

◆ title

const char* title
Initial value:
= "\
* * * UNDER CONSTRUCTION * * *\n\
Converts a cubical set into an equivalent simplicial complex.\n\
Version 0.00 (August 4, 2015). Copyright (C) 1997-2016 by Pawel Pilarczyk.\n\
This is free software. No warranty. Consult 'license.txt' for details."

The title of the program and licensing information.

Definition at line 55 of file cub2sim.cpp.

Referenced by main().