![]() |
CMR
1.3.0
|
#include <binary_linear_space.hpp>
Public Types | |
| typedef std::vector< bool > | vector_type |
Public Member Functions | |
| binary_linear_space (size_t length) | |
| binary_linear_space (const binary_linear_space &other) | |
| const vector_type & | operator[] (size_t index) const |
| size_t | length () const |
| size_t | vectors () const |
| size_t | dimension () const |
| bool | insert_checked (const vector_type &vector) |
| void | insert (const vector_type &vector) |
| int | find (const vector_type &vector) const |
| bool | is_spanned (const vector_type &vector) const |
Static Protected Member Functions | |
| static void | vector_sum (const vector_type &first, const vector_type &second, vector_type &result) |
Models a binary linear vector space by storing all vectors contained in the vector space to quickly test for membership. Space consumption is O(length * 2 ^ dimension).
| typedef std::vector<bool> tu::binary_linear_space::vector_type |
|
inlineexplicit |
Contructs a binary linear vector space containing vectors of the given length.
| length | Length of each vector in the space. |
|
inline |
Copy constructor which copies all vectors.
| other | Instance of another binary linear vector space. |
|
inline |
|
inline |
Searches a given vector in this vector space.
| vector | Given vector of appropriate size |
|
inline |
Inserts a given vector into the vector space without checking whether it exists. Its size() must match the result of length().
| vector | A given vector of appropriate size |
|
inline |
Inserts a given vector into the vector space if it is not contained already. Its size() must match the result of length().
| vector | A given vector of appropriate size |
|
inline |
Tests whether a given vector is spanned by this vector space.
| vector | A given vector of appropriate size |
|
inline |
|
inline |
Read-only access to the vectors in this vector space.
| index | Index in range [0, vectors() ) |
|
inlinestaticprotected |
Calculates the sum of two binary vectors and stores it in a third one. All must have the same size.
| first | First summand vector |
| second | Second summand vector |
| result | Vector containing the result |
|
inline |