1 #ifndef CLASSIC_Array1D_HH
2 #define CLASSIC_Array1D_HH
134 len(array.len), data(new
T[len]) {
141 len(n), data(new
T[len])
147 len(n), data(new
T[len]) {
163 data =
new T[rhs.
len];
173 template<
class T>
inline
179 template<
class T>
inline
187 if(i < 0 || i >= size()) {
188 throw CLRangeError(
"Array1D::operator()",
"Index out of range.");
196 if(i < 0 || i >= size()) {
197 throw CLRangeError(
"Array1D::operator()",
"Index out of range.");
246 std::ostream &operator<<(std::ostream &os, const Array1D<T> &v) {
247 for(
int i = 0; i < v.size(); ++i) {
255 #endif // CLASSIC_Array1D_HH
and give any other recipients of the Program a copy of this License along with the Program You may charge a fee for the physical act of transferring a copy
T & operator[](int)
Get reference to element.
int size() const
Get array size.
T * iterator
The iterator type for the array.
clearpage the user may choose between constant or variable radius This model includes fringe fields begin
Inform & endl(Inform &inf)
Array1D< T > & operator=(const Array1D< T > &)
T & operator()(int n)
Get reference to element.
iterator begin()
Get beginning of data.
iterator end()
Get end of data.
T value_type
The value type of this array.
Array1D()
Default constructor.
const T * const_iterator
The iterator type for constant array.
void resize(int size)
Change array size.