Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::datastructure Namespace Reference

Namespaces

namespace  internal

Classes

class  CrsMap
class  SmallVector
class  CrsMapUncompressed
 A class that behaves like a vector of vectors, providing automatic row range checking. More...
class  IndexTracker
 A class that uses a linked list to keep track of all the indices of a vector that are equal to a certain value. The values are expected to be lower than the size N of the vector (larger values grow the list heads). More...
class  KDTree
 KDTree is a data structure for efficiently querying nearest neighbors and performing spatial searches in a k-dimensional space. More...
class  TriMatrix
 A class that represents a triangular or square matrix, with optional support for tensor-like multi-dimensional data. More...
class  TetraTensor
 A class that represents a tetrahedral matrix or tensor, with optional support for higher-dimensional tensor-like data. More...

Typedefs

template<typename DataType>
using CrsMapUncompressedVariant
template<std::size_t Dim, bool Simplex, typename DataType, typename IndexType>
using SimplexDataView

Functions

template<typename DataType, typename IndexType, IndexType RowSize>
std::ostream & operator<< (std::ostream &os, const CrsMap< DataType, IndexType, RowSize > &map)
 Overloaded stream insertion operator for CrsMap objects.
template<typename DataType>
CrsMapUncompressedVariant< DataType > getUncompressedCrsMapWithStaticStorageGreaterThan (std::size_t static_size)
 Function that builds an UncompressedCrsMap with at least a certain static storage, up to 8192 elements.
template<typename DataType, std::size_t N>
std::ostream & operator<< (std::ostream &os, const CrsMapUncompressed< DataType, N > &map)
 Overloaded stream insertion operator for CrsMapUncompressed objects.

Typedef Documentation

◆ CrsMapUncompressedVariant

◆ SimplexDataView

template<std::size_t Dim, bool Simplex, typename DataType, typename IndexType>
using vulpes::datastructure::SimplexDataView
Initial value:
std::conditional_t<
Dim == 2,
std::conditional_t<
Dim == 3,
const DataType*>>
A class that represents a tetrahedral matrix or tensor, with optional support for higher-dimensional ...
Definition tensor.hpp:307
A class that represents a triangular or square matrix, with optional support for tensor-like multi-di...
Definition tensor.hpp:60

Function Documentation

◆ getUncompressedCrsMapWithStaticStorageGreaterThan()

template<typename DataType>
CrsMapUncompressedVariant< DataType > vulpes::datastructure::getUncompressedCrsMapWithStaticStorageGreaterThan ( std::size_t static_size)

Function that builds an UncompressedCrsMap with at least a certain static storage, up to 8192 elements.

It may happen that you do not know at compile time a good static size to save the uncompressed data of your map. This function builds a variant with at least a certain amount of static storage up to 8192 elements.

Warning
the overhead of dispatching an std::visit to the std::variant might be significant
Returns
std::variant containing an UncompressedCrsMap

◆ operator<<() [1/2]

template<typename DataType, typename IndexType, IndexType RowSize>
std::ostream & vulpes::datastructure::operator<< ( std::ostream & os,
const CrsMap< DataType, IndexType, RowSize > & map )

Overloaded stream insertion operator for CrsMap objects.

This function outputs the contents of a CrsMap to an output stream in a readable format.

Template Parameters
DataTypeThe type of data stored in the CrsMap.
IndexTypeThe type used for indexing rows and columns in the CrsMap.
RowSizeThe fixed size of each row in the CrsMap.
Parameters
osThe output stream to which the CrsMap will be written.
mapThe CrsMap object to output.
Returns
A reference to the output stream after writing the CrsMap.

The function writes the CrsMap row by row, displaying each row's index and contents. The format is:

CrsMap with <number_of_rows> rows:
Row <row_index>: [ <element_1> <element_2> ... ]
Definition crs_map.hpp:72

Each element in a row is separated by a space, and rows are displayed on separate lines.

◆ operator<<() [2/2]

template<typename DataType, std::size_t N>
std::ostream & vulpes::datastructure::operator<< ( std::ostream & os,
const CrsMapUncompressed< DataType, N > & map )

Overloaded stream insertion operator for CrsMapUncompressed objects.

This function outputs the contents of a CrsMapUncompressed to an output stream in a readable format.

Template Parameters
DataTypeThe type of data stored in the CrsMapUncompressed.
NThe fixed size of each SmallVector in the CrsMapUncompressed.
Parameters
osThe output stream to which the CrsMapUncompressed will be written.
mapThe CrsMapUncompressed object to output.
Returns
A reference to the output stream after writing the CrsMapUncompressed.

The function writes the CrsMapUncompressed row by row, displaying each row's index and contents. The format is:

CrsMapUncompressed with <number_of_rows> rows:
Row <row_index>: [ <element_1> <element_2> ... ]

Each element in a row is separated by a space, and rows are displayed on separate lines.