Construct version 5.4.4
An agent based modeling framework
|
Definitions for iterators, helper functions, and operators that support Graph. More...
Classes | |
struct | col_begin_iterator |
An iterator that iterates over the start of each row. More... | |
struct | col_graph_iterator |
An iterator parent for iterators that increment through a column. More... | |
struct | const_col_begin_iterator |
A constant iterator that iterates over the start of each column. More... | |
struct | const_full_col_iterator |
A constant iterator that iterates over every row at a constant column. More... | |
struct | const_full_row_iterator |
A constant iterator that iterates over every column at a constant row. More... | |
struct | const_row_begin_iterator |
A constant iterator that iterates over the start of each row. More... | |
struct | const_sparse_col_iterator |
A constant iterator that iterates over each element whose value does not equal the skip value. More... | |
struct | const_sparse_row_iterator |
A constant iterator that iterates over each element whose value does not equal the skip value. More... | |
struct | full_col_iterator |
An iterator that iterates over every row at a constant column. More... | |
struct | full_row_iterator |
An iterator that iterates over every column at a constant row. More... | |
struct | graph_iterator |
Finds the next index that aligns iterators. More... | |
struct | row_begin_iterator |
An iterator that iterates over the start of each row. More... | |
struct | row_graph_iterator |
An iterator parent for iterators that increment through a row. More... | |
struct | sparse_col_iterator |
An iterator that iterates over each element whose value does not equal the skip value. More... | |
struct | sparse_graph_iterator |
An iterator parent for sparse iterators that stores the value that the iterators must skip over when incrementing. More... | |
struct | sparse_row_iterator |
An iterator that iterates over each element whose value does not equal the skip value. More... | |
Functions | |
template<typename it1 , typename it2 , typename... its> | |
auto | it_align (it1 first_iterator, it2 second_iterator, its... extra_iterators) |
Function that zips the iterators passed to it and keeps all the iterators aligned with each other. More... | |
template<typename it1 , typename it2 , typename... its> | |
auto | it_misalign (it1 misaligned_iterator, it2 second_iterator, its... extra_iterators) |
Function that zips the iterators passed to it and keeps all but the first iterators aligned with each other. More... | |
template<typename T > | |
void | check_range (const Graph< T > &graph, const T &lower_bound, const T &upper_bound) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_product (const Graph< left > &lhs, const Graph< right > &rhs, bool row_dense, bool col_dense) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_product (const Graph< left > &lhs, const Graph< right > &rhs) |
template<typename left , typename right > | |
auto | ewise_product (const Temporary_Graph< left > &lhs, const Graph< right > &rhs) |
template<typename left , typename right > | |
auto | ewise_product (const Graph< left > &lhs, const Temporary_Graph< right > &rhs) |
template<typename left , typename right > | |
auto | ewise_product (const Temporary_Graph< left > &lhs, const Temporary_Graph< right > &rhs) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_product (const Graph< left > &lhs, const Transpose< right > &rhs, bool row_dense, bool col_dense) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_product (const Graph< left > &lhs, const Transpose< right > &rhs) |
template<typename left , typename right > | |
auto | ewise_product (const Transpose< left > &lhs, const Graph< right > &rhs) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_product (const Transpose< left > &lhs, const Transpose< right > &rhs, bool row_dense, bool col_dense) |
template<typename left , typename right > | |
auto | ewise_product (const Transpose< left > &lhs, const Transpose< right > &rhs) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_divide (const Graph< left > &lhs, const Graph< right > &rhs, bool row_dense, bool col_dense) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_divide (const Graph< left > &lhs, const Graph< right > &rhs) |
template<typename left , typename right > | |
auto | ewise_divide (const Temporary_Graph< left > &lhs, const Graph< right > &rhs) |
template<typename left , typename right > | |
auto | ewise_divide (const Graph< left > &lhs, const Temporary_Graph< right > &rhs) |
template<typename left , typename right > | |
auto | ewise_divide (const Temporary_Graph< left > &lhs, const Temporary_Graph< right > &rhs) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_divide (const Graph< left > &lhs, const Transpose< right > &rhs, bool row_dense, bool col_dense) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_divide (const Graph< left > &lhs, const Transpose< right > &rhs) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_divide (const Transpose< left > &lhs, const Graph< right > &rhs, bool row_dense, bool col_dense) |
template<typename left , typename right > | |
auto | ewise_divide (const Transpose< left > &lhs, const Graph< right > &rhs) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | ewise_divide (const Transpose< left > &lhs, const Transpose< right > &rhs, bool row_dense, bool col_dense) |
template<typename left , typename right > | |
auto | ewise_divide (const Transpose< left > &lhs, const Transpose< right > &rhs) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | dot_product (const Graph< left > &lhs, const Graph< right > &rhs, bool output_row_dense, bool output_col_dense) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | dot_product (const Graph< left > &lhs, const Transpose< right > &rhsT, bool output_row_dense, bool output_col_dense) |
template<typename left , typename right , class output = decltype(left()* right())> | |
Temporary_Graph< output > | dot_product (const Transpose< left > &lhsT, const Graph< right > &rhs, bool output_row_dense, bool output_col_dense) |
Variables | |
static constexpr unsigned char | transform [16] |
Definitions for iterators, helper functions, and operators that support Graph.
void graph_utils::check_range | ( | const Graph< T > & | graph, |
const T & | lower_bound, | ||
const T & | upper_bound | ||
) |
summary>
Temporary_Graph< output > graph_utils::dot_product | ( | const Graph< left > & | lhs, |
const Graph< right > & | rhs, | ||
bool | output_row_dense, | ||
bool | output_col_dense | ||
) |
summary>
Temporary_Graph< output > graph_utils::dot_product | ( | const Graph< left > & | lhs, |
const Transpose< right > & | rhsT, | ||
bool | output_row_dense, | ||
bool | output_col_dense | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_divide | ( | const Graph< left > & | lhs, |
const Graph< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_divide | ( | const Graph< left > & | lhs, |
const Graph< right > & | rhs, | ||
bool | row_dense, | ||
bool | col_dense | ||
) |
summary>
auto graph_utils::ewise_divide | ( | const Graph< left > & | lhs, |
const Temporary_Graph< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_divide | ( | const Graph< left > & | lhs, |
const Transpose< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_divide | ( | const Graph< left > & | lhs, |
const Transpose< right > & | rhs, | ||
bool | row_dense, | ||
bool | col_dense | ||
) |
summary>
auto graph_utils::ewise_divide | ( | const Temporary_Graph< left > & | lhs, |
const Graph< right > & | rhs | ||
) |
summary>
auto graph_utils::ewise_divide | ( | const Temporary_Graph< left > & | lhs, |
const Temporary_Graph< right > & | rhs | ||
) |
summary>
auto graph_utils::ewise_divide | ( | const Transpose< left > & | lhs, |
const Graph< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_divide | ( | const Transpose< left > & | lhs, |
const Graph< right > & | rhs, | ||
bool | row_dense, | ||
bool | col_dense | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_divide | ( | const Transpose< left > & | lhs, |
const Transpose< right > & | rhs, | ||
bool | row_dense, | ||
bool | col_dense | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_product | ( | const Graph< left > & | lhs, |
const Graph< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_product | ( | const Graph< left > & | lhs, |
const Graph< right > & | rhs, | ||
bool | row_dense, | ||
bool | col_dense | ||
) |
summary>
auto graph_utils::ewise_product | ( | const Graph< left > & | lhs, |
const Temporary_Graph< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_product | ( | const Graph< left > & | lhs, |
const Transpose< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_product | ( | const Graph< left > & | lhs, |
const Transpose< right > & | rhs, | ||
bool | row_dense, | ||
bool | col_dense | ||
) |
summary>
auto graph_utils::ewise_product | ( | const Temporary_Graph< left > & | lhs, |
const Graph< right > & | rhs | ||
) |
summary>
auto graph_utils::ewise_product | ( | const Temporary_Graph< left > & | lhs, |
const Temporary_Graph< right > & | rhs | ||
) |
summary>
auto graph_utils::ewise_product | ( | const Transpose< left > & | lhs, |
const Graph< right > & | rhs | ||
) |
summary>
auto graph_utils::ewise_product | ( | const Transpose< left > & | lhs, |
const Transpose< right > & | rhs | ||
) |
summary>
Temporary_Graph< output > graph_utils::ewise_product | ( | const Transpose< left > & | lhs, |
const Transpose< right > & | rhs, | ||
bool | row_dense, | ||
bool | col_dense | ||
) |
summary>
auto graph_utils::it_align | ( | it1 | first_iterator, |
it2 | second_iterator, | ||
its... | extra_iterators | ||
) |
Function that zips the iterators passed to it and keeps all the iterators aligned with each other.
Iterators passed to the function are copied instead of stored by reference. The function constructs a class that contains all the iterators and the logic for advancing all iterators. The returned object is intended to be used in a for loop with the colon syntax. This will yield a loop variable which is a tuple containing all the iterators. Each loop will return this tuple with all iterators having equal typeless_graph_iterator::index values. The loop will continue until the iterator's index has reached its typeless_graph_iterator::max value.
first_iterator | Iterator that all other iterators align to. |
second_iterator | An iterator that gets aligned. |
extra_iterators | All other iterators to be included in the alignment. |
Example
Output:
Intersect of row 0 and row 1 is 2 Custom calculation of graph is 8
Complexity
Depends on the underlying data structure that the iterators points to. At best O(n) with n being the number of iterators and O(n*m) with m being the size of the dimension.
Iterator validity
Does not inheriently modify the underlying data structure that the iterators point to.
Exception Safety
An assertion is raised if the dimension that any iterator iterates over does not have the same size as all other iterators.
auto graph_utils::it_misalign | ( | it1 | misaligned_iterator, |
it2 | second_iterator, | ||
its... | extra_iterators | ||
) |
Function that zips the iterators passed to it and keeps all but the first iterators aligned with each other.
Iterators passed to the function are copied instead of stored by reference. The function constructs a class that contains all the iterators and the logic for advancing all iterators. The returned object is intended to be used in a for loop with the colon syntax. This will yield a loop variable which is a tuple containing all the iterators. Each loop will return this tuple with all iterators after the first having equal typeless_graph_iterator::index values and the first iterator having a greater value than that. The loop will continue until all execpt the first iterator's index has reached its typeless_graph_iterator::max value.
misaligned_iterator | Iterator that all is always misaligned with all other iterators. |
second_iterator | Iterator that all other iterators except the first iterator gets aligned to. |
extra_iterators | All other iterators to be included in the alignment. |
Example
Output:
Overlap of row 0 and row 1 is 2 Custom calculation of graph is 5
Complexity
Depends on the underlying data structure that the iterators points to. At best O(n) with n being the number of iterators and O(n*m) with m being the size of the dimension.
Iterator validity
Does not inheriently modify the underlying data structure that the iterators point to.
Exception Safety
An assertion is raised if the dimension that any iterator iterates over does not have the same size as all other iterators.
|
staticconstexpr |
summary>