Value type for a filtration function on a cell complex.
More...
#include <concept/Simplex_tree/FiltrationValue.h>
|
|
bool | operator< (const FiltrationValue &f1, const FiltrationValue &f2) |
| | Strictly smaller operator. If the filtration values are totally ordered, should be a StrictWeakOrdering.
|
| |
|
bool | operator== (const FiltrationValue &f1, const FiltrationValue &f2) |
| | Equality operator.
|
| |
|
FiltrationValue | operator- (const FiltrationValue &f) |
| | Only necessary if std::numeric_limits<FiltrationValue>::has_infinity returns true. Negates the value. Only used on the infinity filtration value to obtain minus infinity.
|
| |
|
bool | is_positive_infinity (const FiltrationValue &f) |
| | Returns true if and only if the given filtration value is at infinity. Overloads for native arithmetic types are already implemented using std::numeric_limits.
|
| |
| bool | unify_lifetimes (FiltrationValue &f1, const FiltrationValue &f2) |
| | Given two filtration values at which a simplex exists, computes the minimal union of births generating a lifetime including those two values. The result is stored in the first parameter. The overload for arithmetic types like double or int is already implemented as the minimum of the two given values and can also be used for non native arithmetic types like CGAL::Gmpq as long as it has an operator<. The overload is available with Gudhi::unify_lifetimes.
|
| |
| bool | intersect_lifetimes (FiltrationValue &f1, const FiltrationValue &f2) |
| | Given two filtration values, stores in the first value the lowest common upper bound of the two values. The overload for arithmetic types like double or int is already implemented as the maximum of the two given values and can also be used for non native arithmetic types like CGAL::Gmpq as long as it has an operator<. The overload is available with Gudhi::intersect_lifetimes.
|
| |
| char * | serialize_value_to_char_buffer (const FiltrationValue &value, char *start) |
| | Only necessary when serializing the simplex tree. Serialize the given value and insert it at start position. Overloads for native arithmetic types or other simple types are already implemented.
|
| |
| const char * | deserialize_value_from_char_buffer (FiltrationValue &value, const char *start) |
| | Only necessary when deserializing the simplex tree. Deserializes the object at the given start position in an array of char, which was previously serialized by serialize_value_to_char_buffer. Then, sets the value with it. Overloads for native arithmetic types or other simple types are already implemented.
|
| |
|
std::size_t | get_serialization_size_of (const FiltrationValue &value) |
| | Only necessary when serializing the simplex tree. Returns the serialization size of the given object. Overloads for native arithmetic types or other simple types are already implemented.
|
| |
|
std::ostream & | operator<< (std::ostream &os, const FiltrationValue &fil) |
| | Outputs the filtration value into the stream. Only necessary if the operator<< of the simplex tree needs to be used. If also the simplex tree's operator>> is necessary, the output has to correspond to what the filtration value's operator>> can reed.
|
| |
|
std::istream & | operator>> (std::istream &os, FiltrationValue &fil) |
| | Inputs the content of the stream into the filtration value. Only necessary if the operator>> of the simplex tree needs to be used. If also the simplex tree's operator<< is necessary, the intput format has to correspond to the one used by the filtration value's operator<<.
|
| |
Value type for a filtration function on a cell complex.
Needs to implement std::numeric_limits<FiltrationValue>::has_infinity, std::numeric_limits<FiltrationValue>::infinity(), std::numeric_limits<FiltrationValue>::max() and std::numeric_limits<FiltrationValue>::lowest(). But when std::numeric_limits<FiltrationValue>::has_infinity returns true, std::numeric_limits<FiltrationValue>::max() and std::numeric_limits<FiltrationValue>::lowest() can both simply throw when called, as well as, std::numeric_limits<FiltrationValue>::infinity() if std::numeric_limits<FiltrationValue>::has_infinity returns false.
A filtration of a cell complex (see FilteredComplex) is a function \(f:\mathbf{K} \rightarrow \mathbb{R}\) satisfying \(f(\tau)\leq
f(\sigma)\) whenever \(\tau \subseteq \sigma\). Ordering the simplices by increasing filtration values (breaking ties so as a simplex appears after its subsimplices of same filtration value) provides an indexing scheme (see IndexingTag).
◆ deserialize_value_from_char_buffer
| const char * deserialize_value_from_char_buffer |
( |
FiltrationValue & | value, |
|
|
const char * | start ) |
|
friend |
Only necessary when deserializing the simplex tree. Deserializes the object at the given start position in an array of char, which was previously serialized by serialize_value_to_char_buffer. Then, sets the value with it. Overloads for native arithmetic types or other simple types are already implemented.
- Parameters
-
| value | The value where to deserialize based on its type. |
| start | Start position where the value is serialized. |
- Returns
- The new position in the array of char for the next deserialization.
◆ intersect_lifetimes
Given two filtration values, stores in the first value the lowest common upper bound of the two values. The overload for arithmetic types like double or int is already implemented as the maximum of the two given values and can also be used for non native arithmetic types like CGAL::Gmpq as long as it has an operator<. The overload is available with Gudhi::intersect_lifetimes.
- Returns
- True if and only if the values in
f1 were actually modified.
◆ serialize_value_to_char_buffer
| char * serialize_value_to_char_buffer |
( |
const FiltrationValue & | value, |
|
|
char * | start ) |
|
friend |
Only necessary when serializing the simplex tree. Serialize the given value and insert it at start position. Overloads for native arithmetic types or other simple types are already implemented.
- Parameters
-
| value | The value to serialize. |
| start | Start position where the value is serialized. |
- Returns
- The new position in the array of char for the next serialization.
◆ unify_lifetimes
Given two filtration values at which a simplex exists, computes the minimal union of births generating a lifetime including those two values. The result is stored in the first parameter. The overload for arithmetic types like double or int is already implemented as the minimum of the two given values and can also be used for non native arithmetic types like CGAL::Gmpq as long as it has an operator<. The overload is available with Gudhi::unify_lifetimes.
For a k-critical filtration, FiltrationValue should be able to store an union of values (corresponding to the different births of a same simplex) and this method adds the values of f2 in f1 and removes the values from f1 which are comparable and greater than other values. In the special case of 1-critical filtration, as the union should not contain more than one birth element, this method is expected to throw if the two given elements in the filtration values are not comparable. If they are comparable, the union is simply the minimum of both.
- Returns
- True if and only if the values in
f1 were actually modified.
The documentation for this struct was generated from the following file: