Regina Calculation Engine
|
Functions | |
Container * | regina::readDehydrationList (const char *filename, unsigned colDehydrations=0, int colLabels=-1, unsigned long ignoreLines=0) |
Reads a list of dehydrated triangulations from the given text file. More... | |
Container * | regina::readIsoSigList (const char *filename, unsigned dimension=3, unsigned colSigs=0, int colLabels=-1, unsigned long ignoreLines=0) |
Reads a list of isomorphism signatures from the given text file. More... | |
Triangulation< 3 > * | regina::readOrb (const char *filename) |
Reads a triangulation from the given Orb / Casson file. More... | |
Container* regina::readDehydrationList | ( | const char * | filename, |
unsigned | colDehydrations = 0 , |
||
int | colLabels = -1 , |
||
unsigned long | ignoreLines = 0 |
||
) |
Reads a list of dehydrated triangulations from the given text file.
The file should contain one dehydration string per line. These strings will be rehydrated as described in Triangulation<3>::insertRehydration().
A newly allocated container will be returned; the imported triangulations will be inserted as children of this container. The container will not be assigned a label. The individual triangulations will be assigned labels according to the parameter colLabels.
If any dehydrations strings are invalid, these will be recorded in an additional text packet that will be the last child of the returned container.
If an I/O error occurred while trying to read the given file, 0 will be returned.
In its simplest form, the text file can simply contain one dehydration string per line and nothing else. However, more complex formats are allowed. In particular, by passing appropriate values for the arguments colDehydrations and colLabels, the dehydration strings and triangulation packet labels can be taken from arbitrary columns of the text file. Columns are considered to be separated by whitespace and are numbered beginning at 0.
filename | the name of the text file from which to read. |
colDehydrations | the column of the text file containing the dehydration strings. |
colLabels | the column of the text file containing the triangulation packet labels. If this is negative then the dehydration strings themselves will be used as packet labels. |
ignoreLines | the number of lines at the beginning of the text file that should be ignored completely. |
Container* regina::readIsoSigList | ( | const char * | filename, |
unsigned | dimension = 3 , |
||
unsigned | colSigs = 0 , |
||
int | colLabels = -1 , |
||
unsigned long | ignoreLines = 0 |
||
) |
Reads a list of isomorphism signatures from the given text file.
The file should contain one isomorphism signature per line. Signatures for both 3-manifold triangulations and 4-manifold triangulations are accepted (though they cannot be mixed together within the same file). These isomorphism signatures will be converted into triangulations using Triangulation<3>::fromIsoSig() and Triangulation<4>::fromIsoSig() respectively.
A newly allocated container will be returned; the imported triangulations will be inserted as children of this container. The container will not be assigned a label. The individual triangulations will be assigned labels according to the parameter colLabels.
If any isomorphism signatures are invalid, these will be recorded in an additional text packet that will be the last child of the returned container.
If an I/O error occurred while trying to read the given file, 0 will be returned.
In its simplest form, the text file can simply contain one isomorphism signature per line and nothing else. However, more complex formats are allowed. In particular, by passing appropriate values for the arguments colSigs and colLabels, the isomorphism signatures and triangulation packet labels can be taken from arbitrary columns of the text file. Columns are considered to be separated by whitespace and are numbered beginning at 0.
filename | the name of the text file from which to read. |
dimension | either 3 or 4, indicating whether isomorphism signatures should be expanded into 3-manifold triangulations or 4-manifold triangulations respectively. |
colSigs | the column of the text file containing the isomorphism signatures. |
colLabels | the column of the text file containing the triangulation packet labels. If this is negative then the isomorphism signatures themselves will be used as packet labels. |
ignoreLines | the number of lines at the beginning of the text file that should be ignored completely. |
Triangulation<3>* regina::readOrb | ( | const char * | filename | ) |
Reads a triangulation from the given Orb / Casson file.
A newly allocated triangulation will be returned; it is the user's responsibility to deallocate this when it is finished with.
The packet label of the new triangulation will be the manifold name read from the second line of the Orb / Casson file. The first line of the Orb / Casson file must simply be ``% orb
''.
If the file could not be read or if the data was not in the correct format, 0 will be returned.
filename | the name of the Orb / Casson file from which to read. |