SheafSystem
0.0.0.0
|
A two index array with variable length rows. More...
#include <ragged_array.h>
Friends | |
size_t | deep_size (const ragged_array< T > &xra, bool xinclude_shallow) |
The deep size of the referenced object of type ragged_array<T>; if xinclude_shallow, add the sizeof xp to the result. More... | |
RAGGED_ARRAY FACET | |
typedef unsigned long | index_type |
The integer type used to index this. More... | |
typedef rc_ptr< ragged_array< T > > | ptr |
Reference counted pointer type. More... | |
block< T > | _values |
The values stored in the array. More... | |
block< index_type > | _col_cts |
The number of columns in each row. More... | |
block< index_type > | _row_ptrs |
Index of the first value in each row. More... | |
ragged_array (size_t xct=0) | |
Default constructor; creates an empty array with one row and space reserved for xct values. More... | |
ragged_array (const ragged_array &xother) | |
Copy constructor. More... | |
ragged_array (const index_type *xcol_cts, index_type xcol_cts_ub) | |
Creates an instance with xrow_ct rows, with the number of columns in the i-th row given by xcol_cts[i]. More... | |
ragged_array (const index_type xrow_ct, const index_type xvalue_ct) | |
Creates an instance with xrow_ct rows and xvalue_ct values. More... | |
virtual | ~ragged_array () |
Destructor. More... | |
ragged_array & | operator= (const ragged_array &xother) |
Assignment operator. More... | |
virtual bool | operator== (const ragged_array &xother) const |
True if this is equivalent to xother. More... | |
index_type | row_ct () const |
The number of rows. More... | |
index_type | col_ct (const index_type xrow_index) const |
The number of columns for the xrow_index-th row. More... | |
index_type * | col_cts () const |
The naked, underlying storage for number of columns for each row. More... | |
T * | values () const |
The naked, underlying storage for the values in the array. More... | |
index_type | value_ct () const |
The number of values. More... | |
T * | row (const index_type xrow_index) const |
The row with index xrow_index. More... | |
T * | operator[] (const index_type xrow_index) const |
The row index operator; alias for row(index_type). More... | |
void | reset_rows () |
Reinitializes access by row index using the column counts in col_cts(). More... | |
void | reset_rows (const index_type *xcol_cts, const index_type xcol_cts_ub) |
Reinitializes access by row index using the column counts in xcol_cts. More... | |
index_type | sum_col_cts () const |
The sum of the column counts in col_cts(). More... | |
index_type | sum_col_cts (const index_type *xcol_cts, const index_type xcol_cts_ub) const |
The sum of the column counts in xcol_cts. More... | |
void | initialize_push_back (index_type xrow_ct, index_type xvalue_ct) |
Reserves storage for xrow_ct rows containing xvalue_ct total values and initializes push_back into row 0 column 0. More... | |
index_type | back_row () const |
The last row; the active row for push_back. More... | |
void | new_back_row () |
Creates a new last row. More... | |
void | push_back (const T &xvalue) |
Add a value to the back of the back row. More... | |
void | initialize (const index_type *xcol_cts, index_type xcol_cts_ub) |
Creates an instance with xcol_cts_ub rows, with the number of columns in the i-th row given by xcol_cts[i]. More... | |
ANY FACET | |
virtual ragged_array * | clone () const |
Virtual constructor; makes a new instance of the same type as this. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
virtual bool | is_ancestor_of (const any *xother) const |
Conformance test; true if other conforms to this. More... | |
Additional Inherited Members | |
Public Member Functions inherited from sheaf::rc_any | |
rc_any () | |
Default constructor. More... | |
rc_any (const rc_any &xother) | |
Constructor. More... | |
rc_any & | operator= (const rc_any &xother) |
Assignment operator. More... | |
~rc_any () | |
Destructor. More... | |
void | add_reference () |
Increment the reference count. More... | |
void | remove_reference () |
Decrement the reference count. Delete this object if the reference count is zero. More... | |
bool | is_shared () const |
True if the reference count is greater than one. More... | |
size_type | ref_ct () const |
Return the reference count. More... | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes inherited from sheaf::rc_any | |
size_type | _ref_ct |
Reference count. More... | |
A two index array with variable length rows.
Definition at line 62 of file unstructured_block_builder.h.
typedef unsigned long sheaf::ragged_array< T >::index_type |
The integer type used to index this.
Definition at line 70 of file ragged_array.h.
typedef rc_ptr< ragged_array<T> > sheaf::ragged_array< T >::ptr |
Reference counted pointer type.
Definition at line 76 of file ragged_array.h.
sheaf::ragged_array< T >::ragged_array | ( | size_t | xct = 0 | ) |
Default constructor; creates an empty array with one row and space reserved for xct values.
Definition at line 46 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::ragged_array().
sheaf::ragged_array< T >::ragged_array | ( | const ragged_array< T > & | xother | ) |
Copy constructor.
Definition at line 78 of file ragged_array.impl.h.
sheaf::ragged_array< T >::ragged_array | ( | const index_type * | xcol_cts, |
index_type | xcol_cts_ub | ||
) |
Creates an instance with xrow_ct rows, with the number of columns in the i-th row given by xcol_cts[i].
Definition at line 96 of file ragged_array.impl.h.
sheaf::ragged_array< T >::ragged_array | ( | const index_type | xrow_ct, |
const index_type | xvalue_ct | ||
) |
Creates an instance with xrow_ct rows and xvalue_ct values.
Definition at line 120 of file ragged_array.impl.h.
|
virtual |
Destructor.
Definition at line 165 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::ragged_array().
ragged_array< T >::index_type sheaf::ragged_array< T >::back_row | ( | ) | const |
The last row; the active row for push_back.
Definition at line 535 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::initialize_push_back().
|
virtual |
Virtual constructor; makes a new instance of the same type as this.
Reimplemented from sheaf::any.
Definition at line 667 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::initialize().
ragged_array< T >::index_type sheaf::ragged_array< T >::col_ct | ( | const index_type | xrow_index | ) | const |
The number of columns for the xrow_index-th row.
Definition at line 259 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::clone(), sheaf::ragged_array_index_space_interval::contains_unglued_hub(), sheaf::ragged_array_index_space_interval::ct(), sheaf::ragged_array_index_space_interval::end(), sheaf::ragged_array< pod_index_type >::operator=(), sheaf::ragged_array< pod_index_type >::operator==(), sheaf::ragged_array_index_space_interval::pod(), fiber_bundle::unstructured_block_builder::put_name_mode(), and sheaf::ragged_array< pod_index_type >::row_ct().
ragged_array< T >::index_type * sheaf::ragged_array< T >::col_cts | ( | ) | const |
The naked, underlying storage for number of columns for each row.
Definition at line 281 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::col_ct().
|
protected |
Creates an instance with xcol_cts_ub rows, with the number of columns in the i-th row given by xcol_cts[i].
Definition at line 611 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::push_back().
void sheaf::ragged_array< T >::initialize_push_back | ( | index_type | xrow_ct, |
index_type | xvalue_ct | ||
) |
Reserves storage for xrow_ct rows containing xvalue_ct total values and initializes push_back into row 0 column 0.
Definition at line 496 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::sum_col_cts().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 692 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::clone().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 713 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::invariant().
void sheaf::ragged_array< T >::new_back_row | ( | ) |
Creates a new last row.
Definition at line 555 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::back_row(), fiber_bundle::unary_index_space::neighbor_list(), fiber_bundle::binary_index_space::neighbor_list(), and fiber_bundle::ternary_index_space::neighbor_list().
ragged_array< T > & sheaf::ragged_array< T >::operator= | ( | const ragged_array< T > & | xother | ) |
Assignment operator.
Definition at line 183 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::~ragged_array().
|
virtual |
True if this is equivalent to xother.
Definition at line 211 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::operator=().
T * sheaf::ragged_array< T >::operator[] | ( | const index_type | xrow_index | ) | const |
The row index operator; alias for row(index_type).
Definition at line 372 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::row().
void sheaf::ragged_array< T >::push_back | ( | const T & | xvalue | ) |
Add a value to the back of the back row.
Definition at line 582 of file ragged_array.impl.h.
Referenced by fiber_bundle::unary_index_space::neighbor_list(), fiber_bundle::binary_index_space::neighbor_list(), fiber_bundle::ternary_index_space::neighbor_list(), and sheaf::ragged_array< pod_index_type >::new_back_row().
void sheaf::ragged_array< T >::reset_rows | ( | ) |
Reinitializes access by row index using the column counts in col_cts().
Definition at line 396 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::operator[](), and sheaf::ragged_array< pod_index_type >::reset_rows().
void sheaf::ragged_array< T >::reset_rows | ( | const index_type * | xcol_cts, |
const index_type | xcol_cts_ub | ||
) |
Reinitializes access by row index using the column counts in xcol_cts.
Definition at line 426 of file ragged_array.impl.h.
T * sheaf::ragged_array< T >::row | ( | const index_type | xrow_index | ) | const |
The row with index xrow_index.
Definition at line 348 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array_index_space_interval::contains_unglued_hub(), sheaf::ragged_array_index_space_interval::pod(), and sheaf::ragged_array< pod_index_type >::value_ct().
ragged_array< T >::index_type sheaf::ragged_array< T >::row_ct | ( | ) | const |
The number of rows.
Definition at line 239 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::clone(), fiber_bundle::unary_index_space::neighbor_list(), fiber_bundle::binary_index_space::neighbor_list(), fiber_bundle::ternary_index_space::neighbor_list(), sheaf::ragged_array_index_space_interval::new_space(), sheaf::ragged_array< pod_index_type >::operator=(), sheaf::ragged_array< pod_index_type >::operator==(), and fiber_bundle::unstructured_block_builder::put_name_mode().
ragged_array< T >::index_type sheaf::ragged_array< T >::sum_col_cts | ( | ) | const |
The sum of the column counts in col_cts().
Definition at line 451 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::reset_rows(), and sheaf::ragged_array< pod_index_type >::sum_col_cts().
ragged_array< T >::index_type sheaf::ragged_array< T >::sum_col_cts | ( | const index_type * | xcol_cts, |
const index_type | xcol_cts_ub | ||
) | const |
The sum of the column counts in xcol_cts.
Definition at line 471 of file ragged_array.impl.h.
ragged_array< T >::index_type sheaf::ragged_array< T >::value_ct | ( | ) | const |
The number of values.
Definition at line 328 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::values().
T * sheaf::ragged_array< T >::values | ( | ) | const |
The naked, underlying storage for the values in the array.
Definition at line 304 of file ragged_array.impl.h.
Referenced by sheaf::ragged_array< pod_index_type >::clone(), sheaf::ragged_array< pod_index_type >::col_cts(), and sheaf::ragged_array< pod_index_type >::operator=().
|
friend |
The deep size of the referenced object of type ragged_array<T>; if xinclude_shallow, add the sizeof xp to the result.
Definition at line 759 of file ragged_array.impl.h.
|
protected |
The number of columns in each row.
Definition at line 211 of file ragged_array.h.
Referenced by sheaf::deep_size(), and sheaf::ragged_array< pod_index_type >::operator=().
|
protected |
Index of the first value in each row.
Definition at line 216 of file ragged_array.h.
Referenced by sheaf::deep_size().
|
protected |
The values stored in the array.
Definition at line 206 of file ragged_array.h.
Referenced by sheaf::deep_size(), sheaf::ragged_array< pod_index_type >::operator=(), and sheaf::ragged_array< pod_index_type >::operator==().