Geogram
Version 1.9.1
A programming library of geometric algorithms
|
A couple of two indices. More...
#include <geogram/mesh/index.h>
Public Types | |
enum | KeepOrderType { KEEP_ORDER } |
This type is used to overload basic_bindex constructors with versions that keep the order of the stored indices. More... | |
Public Member Functions | |
basic_bindex () | |
Creates an uninitialized basic_bindex. | |
basic_bindex (IndexType i, IndexType j) | |
Creates a basic_bindex from two integers. More... | |
basic_bindex (IndexType i, IndexType j, KeepOrderType order) | |
Creates a basic_bindex from two integers and keeps their order. More... | |
bool | operator< (const basic_bindex< IndexType > &rhs) const |
Compares two basic_bindex. More... | |
bool | operator== (const basic_bindex< IndexType > &rhs) const |
Compares two basic_bindex. More... | |
bool | operator!= (const basic_bindex< IndexType > &rhs) const |
Compares two basic_bindex. More... | |
basic_bindex (const basic_bindex< IndexType > &rhs)=default | |
Constructs a basic_bindex from another one. More... | |
basic_bindex< IndexType > & | operator= (const basic_bindex< IndexType > &rhs)=default |
Assigns a basic_bindex to this one. More... | |
Static Public Member Functions | |
static basic_bindex | inverse (const basic_bindex< IndexType > &b) |
Computes the inverse of a basic_bindex. More... | |
Public Attributes | |
IndexType | indices [2] |
The array of 2 indices. | |
Related Functions | |
(Note that these are not member functions.) | |
template<class IndexType > | |
std::ostream & | operator<< (std::ostream &out, const basic_bindex< IndexType > &B) |
Writes a basic_bindex to a stream. More... | |
A couple of two indices.
Can be used as a key in associative data structures (std::map, std::set). The indices are defined by IndexType
, generally signed or unsigned integers.
IndexType | type of the indices |
enum GEO::basic_bindex::KeepOrderType |
This type is used to overload basic_bindex constructors with versions that keep the order of the stored indices.
Enumerator | |
---|---|
KEEP_ORDER | Value to pass to basic_bindex ordered constructor |
|
inline |
Creates a basic_bindex from two integers.
The integers are reordered.
[in] | i | first integer |
[in] | j | second integer |
|
inline |
Creates a basic_bindex from two integers and keeps their order.
The integers are not sorted.
[in] | i | first integer |
[in] | j | second integer |
[in] | order | argument of type KeepOrderType used to select the right constructor. Use basic_bindex: :KEEP_ORDER for this argument. |
|
default |
Constructs a basic_bindex from another one.
[in] | rhs | the basic_bindex this basic_bindex should be copied from |
|
inlinestatic |
Computes the inverse of a basic_bindex.
The inverse of a basic_bindex has the same indices but in reverse order.
[in] | b | the basic_bindex |
b
but in reverse order.
|
inline |
Compares two basic_bindex.
[in] | rhs | the basic_bindex to compare this basic_bindex with. |
rhs
differs from the index in this basic_bindex at the same position, false otherwise.
|
inline |
Compares two basic_bindex.
[in] | rhs | the basic_bindex to compares this basic_bindex with. |
rhs
is smaller than this basic_bindex according to the lexicographic order, false otherwise.
|
default |
Assigns a basic_bindex to this one.
[in] | rhs | the basic_bindex this basic_bindex should be assigned from |
|
inline |
Compares two basic_bindex.
[in] | rhs | the basic_bindex to compare this basic_bindex with. |
rhs
at the same positions, false otherwise.
|
related |
Writes a basic_bindex to a stream.
Displays all the indices of the basic_bindex B
.
[in] | out | the output stream |
[in] | B | the basic_bindex to write |
IndexType | type of the indices |
out