8 namespace datastructure {
68 int dim[] = {sz, 1, 1};
133 return (&arr) == &(it.arr)
134 && index == it.index;
176 return (&arr) == &(it.arr)
177 && index == it.index;
enabling iterator loops in const contexts
Definition: Array1D.h:151
bool operator==(const const_iterator &it) const
Definition: Array1D.h:175
const_iterator(Array1D< E > const &a, int ind)
Definition: Array1D.h:155
const_iterator & operator--()
Definition: Array1D.h:163
const_iterator & operator++()
Definition: Array1D.h:159
bool operator!=(const const_iterator &it) const
Definition: Array1D.h:179
E const & operator*() const
Definition: Array1D.h:156
enabling range for loops
Definition: Array1D.h:105
iterator & operator++()
Definition: Array1D.h:116
bool operator==(const iterator &it) const
Definition: Array1D.h:132
iterator(Array1D< E > &a, int ind)
Definition: Array1D.h:109
E const & operator*() const
Definition: Array1D.h:110
bool operator!=(const iterator &it) const
Definition: Array1D.h:136
iterator & operator--()
Definition: Array1D.h:120
A BRIDGES 1D array type.
Definition: Array1D.h:53
Array1D(int sz)
builds an array given size
Definition: Array1D.h:67
void setElement(int indx, const Element< E > &e)
change the element that stores Array[indx]
Definition: Array1D.h:100
iterator end()
enables range for loops
Definition: Array1D.h:146
E const & operator[](int indx) const
access Array[indx]
Definition: Array1D.h:78
Element< E > & getElement(int indx)
access the element that stores Array[indx]
Definition: Array1D.h:85
const_iterator begin() const
enables range for loops
Definition: Array1D.h:185
virtual ~Array1D()
Definition: Array1D.h:62
Element< E > const & getElement(int indx) const
access the element that stores Array[indx]
Definition: Array1D.h:92
E & operator[](int indx)
access Array[indx]
Definition: Array1D.h:73
iterator begin()
enables range for loops
Definition: Array1D.h:142
const_iterator end() const
enables range for loops
Definition: Array1D.h:189
The foundation of BRIDGES array types. It is not meant to be used directly by students.
Definition: Array.h:21
void setElement(int ind, Element< E > el)
Set the Element at index ind - 1D array.
Definition: Array.h:129
void setSize(int nd, int *dim)
Set the size of the array.
Definition: Array.h:57
Element< E > & getElement(int index)
Definition: Array.h:108
This is the fundamental building block for all data structures in BRIDGES.
Definition: Element.h:51
typename Array1D< E >::iterator Array1DIterator
Definition: Array1D.h:196
Support for drawing Bar charts.
Definition: alltypes.h:4