|
Public Methods |
| | TensorArray () |
| | construct an empty tensor array.
|
| | TensorArray (int sz,...) |
| | 1st arg is array size in dimension 'dims-1'. Assuming list has 'dims' args.
|
| | TensorArray (int *sz) |
| | array size in dimension 'd' is sz[d]. Assuming 'dims' sizes given.
|
| | TensorArray (MyType const &) |
| | An exact copy of the given array.
|
| | TensorArray (MyType const &, int d, int s, int e) |
| | An exact copy of the subarray, specified as: d:[s, e).
|
| | TensorArray (MyType const &, int *start, int *end) |
| | An exact copy of the subarray, specified as: [start[], end[]).
|
| | TensorArray (TensorArray< T, dims+1 > const &rhs, int d, int s) |
| | Construct from a slice from an array of SuperType(one dimension higher).
|
| | ~TensorArray () |
| TensorArray & | Transform (xchen::Transform const &) |
| | Assume the element type can be transformed.
|
| void | Clear () |
| | Delete all elements to become an empty array.
|
| bool | Empty () const |
| | return true if empty array.
|
| void | PopFront (int i=0) |
| | erase the front elements of each row in i dir.
|
| void | PopBack (int i=0) |
| | erase the back elements of each row in i dir.
|
| void | Insert (linear_iterator itr, T const &val) |
| | Insert before the linear iterator(point to the inserted afterward).++(size_at_last_dimension).
|
| void | Insert (int dir, int before) |
| | Insert 'before' at each row of the dir. ++(size_at_dir). Uninitialized.
|
| void | SetN (int N) |
| | Set reserved subdivision depth to N.
|
| void | InsertMiddlePoints (bool average=true) |
| | set sbd_dpth to 1 if 0. insert uninitualized or average value inbetween eles(rows). dec sbd_dpth.
|
| void | Averaging () |
| | Averaging each hyper-cube cells into its lowerleft corner. dec sz in each dir by one.
|
| TensorArray & | operator= (const TensorArray &rhs) |
| | An exact copy of rhs, except the capacity.
|
| int | GetSize (int dir=0) const |
| | get array size in direction 'dir'.
|
| void | GetSize (int *Sz) const |
| | Sz[d] <-- array size of dir 'd'.
|
| int | GetTotalSize () const |
| | Get total elements in the multi-array.
|
| void | Reserve (int newCapacity,...) |
| | reserve at least 'newCapacity' for dir 'dims-1', and so on...
|
| void | Reserve (int *newCapacity) |
| | reserve at least newCapacity[d] for dir 'd'.
|
| void | Resize (int newSz,...) |
| | expand(no initialization) or cut to 'newSz' for dir 'dims-1', and so on...
|
| void | Resize (int *newSz) |
| | expand(no initialization) or cut to 'Sz[d]' for dir 'd'.
|
| void | ResizeOneDirection (int i, int new_sz) |
| | resize direction i.
|
| void | CopyExtend (int left,...) |
| | ArgList: left,right, left',right'... Copy-Expand two ends left and right times at dir dims-1, etc.
|
| void | CopyExtend (int *rightleft) |
| | Right-copy-expand 'rightleft[0]' and Left-copy-expand 'rightleft[1]' eles at dir 0, etc.
|
| void | CopyExtendAtDirection (int i, int left, int right) |
| | Left-Copy extend the left end point left times at dir i, and Right-Copy....
|
| void | ExtendAtDirection (int i, int left, int right) |
| | Left extend the left end point left times at dir i, and Right extend....
|
| void | Extend (int left,...) |
| | ArgList: left,right, ... Expand two ends left and right times at dir dims-1, and so on.
|
| void | Extend (int *rightleft) |
| | Right-expand 'rightleft[0]' and Left-expand 'rightleft[1]' eles at dir 0, etc. No initialization.
|
| slc_iterator | SliceIterate (int dir=0, int start=0, int end=0) |
| | end=0 defaults to size().
|
| linear_iterator | LinearIterate (int dir, int start, int len) |
| | Subarray is dir:[start, start+len).
|
| linear_iterator | LinearIterate (int *start=0, int *end=0) |
| | 1D iterate the specified subarray
|
| linear_iterator | Begin () |
| | Begin 1D iteration of the array.
|
| linear_iterator | End () |
| | End 1D iteration of the array.
|
| linear_riterator | LinearReverseIterate (int dir, int start, int len) |
| | Subarray is dir:[start, start+len).
|
| linear_riterator | LinearReverseIterate (int *start=0, int *end=0) |
| | reverse version.
|
| linear_riterator | Rbegin () |
| | reverse version.
|
| linear_riterator | Rend () |
| | reverse version.
|
| row_iterator | RowIterate (int row_d, int subarray_d, int start, int len) |
| | Subarray is subarray_d:[start, start+len).
|
| row_iterator | RowIterate (int d=0, int *start=0, int *end=0) |
| | Iterate the subarray row by row.
|
| row_riterator | RowReverseIterate (int r_d, int sub_d, int start, int L) |
| | Subarray is sub_d:[start, start+L).
|
| row_riterator | RowReverseIterate (int d=0, int *start=0, int *end=0) |
| | Iterate the subarray row by row.
|
| idx_op_ret_t | operator[] (int i) |
| | Used for operations [][]..[].
|
| T & | operator[] (Vector< int, dims >const &i) |
| | Vector indexing operation.
|
ListAssignmentCheckSzRt< T,
linear_iterator > | operator= (T) |
| | Assignment from a list.
|
| T const & | GetElement (int *idx) const |
| | Assume idx of len dims. idx[0] is lowest index.
|
| T const & | GetElement (int i,...) const |
| | Assume argLst of len dims. First arg is highest index.
|
| void | PrintShape () const |
| | Output size and capacity of each direction.
|
Friends |
| class | TensorArray< T, dims-1 > |
| ostream & | operator<< (ostream &os, const TensorArray &) |