The concept GeometricChainComplex refines the concept AbstractChainComplex and describes the requirements for (topological) chain complexes associated to geometric complexes used in the concept HDVF. It adds to AbstractChainComplex methods to get vertex coordinates.
- Refines
AbstractChainComplex
- Has models
- CGAL::Homological_discrete_vector_field::Simplicial_chain_complex<CoefficientRing,Traits>
- CGAL::Homological_discrete_vector_field::Cubical_chain_complex<CoefficientRing,Traits>
|
|
const std::vector< Point > & | points () const |
| | Returns the vector of vertex coordinates.
|
|
Point | point (size_t i) const |
| | Returns the coordinates of the cell of index i and dimension 0.
|
◆ write_VTK()
template<typename LabelType = int>
| void GeometricChainComplex::write_VTK |
( |
const GeometricChainComplex & | K, |
|
|
const std::string & | filename, |
|
|
const std::vector< std::vector< LabelType > > * | labels = NULL, |
|
|
std::string | label_type_name = "int" ) |
Exports a GeometricChainComplex (plus, optionally, labels) to a VTK file.
The method generates legacy text VTK files. Labels are exported as such in a VTK property, together with CellID property, containing the index of each cell.
- Template Parameters
-
| CoefficientRing | Coefficient ring of the underlying complex K. |
| Traits | Traits class of the underlying complex K. |
| LabelType | Type of labels provided (default: int). |
- Parameters
-
| K | GeometricChainComplex exported. |
| filename | Output file root (output filenames will be built from this root). |
| labels | Pointer to a vector of labels in each dimension. labels->at(q) is the set of integer labels of cells of dimension q. If labels is NULL, only CellID property is exported. |
| label_type_name | Typename used in VTK export (e.g. "int" or "unsigned_long", see VTK manual ). |
- Exceptions
-
| File_not_found | If the file `filename` cannot be created and opened, throw a `std::runtime_error` exception. |
◆ write_VTK
| void write_VTK |
( |
const GeometricChainComplex & | K, |
|
|
const std::string & | filename, |
|
|
const Column_chain & | chain, |
|
|
int | q, |
|
|
size_t | cellId ) |
|
friend |
Exports a column chain chain over a GeometricChainComplex to a VTK file.
Exports cells of chain with a non null coefficient to a VTK file, with a distinguished cell (for instance the underlying critical cell to a generator). Two properties are exported:
- the Label property (2 for the distinguished cell, 0 for other cells)
- the CellId property containing the "basis" index of the cell.
- Parameters
-
| K | Underlying GeometricChainComplex. |
| filename | Output file name. |
| chain | Column chain exported to VTK. |
| q | Dimension of the chain. |
| cellId | Index of the distinguished cell. |
- Exceptions
-
| File_not_found | If the file `filename` cannot be created and opened, throw a `std::runtime_error` exception. |