1 #ifndef CLASSIC_FArray1D_HH
2 #define CLASSIC_FArray1D_HH
26 #include <initializer_list>
38 template<
class T,
int N>
64 FArray1D(
const std::initializer_list<T>&);
118 template<
class T,
int N>
124 template<
class T,
int N>
130 template<
class T,
int N>
137 template<
class T,
int N>
141 if (init.size() > N) {
142 throw SizeError(
"FArray1D<T,N>(const std::initializer_list<T>&)",
"Size exceeds array dimension.");
149 if (init.size() < N) {
150 std::fill(
begin()+init.size(),
end(),
T(0));
154 template<
class T,
int N>
161 template<
class T,
int N>
inline
167 template<
class T,
int N>
inline
173 template<
class T,
int N>
176 throw CLRangeError(
"FArray1D::operator()",
"Index out of range.");
182 template<
class T,
int N>
185 throw CLRangeError(
"FArray1D::operator()",
"Index out of range.");
191 template<
class T,
int N>
inline
197 template<
class T,
int N>
inline
203 template<
class T,
int N>
inline
209 template<
class T,
int N>
inline
215 template<
class T,
int N>
inline
221 template <
class T,
int N>
222 std::ostream &operator<<(std::ostream &os, const FArray1D<T, N> &v) {
223 for(
int i = 0; i < N; ++i) {
231 #endif // CLASSIC_FArray1D_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
int size() const
Get array size.
const T * const_iterator
Iterator for constant array.
clearpage the user may choose between constant or variable radius This model includes fringe fields begin
Inform & endl(Inform &inf)
T * iterator
Iterator for the array.
iterator end()
Get iterator pointing past end of array.
T value_type
The value type of this array.
const FArray1D & operator=(const FArray1D &)
Assignment.
FArray1D()
Default constructor.
T & operator()(int n)
Get element.
A templated representation for one-dimensional arrays.
T & operator[](int n)
Get element.
iterator begin()
Get iterator pointing to beginning of array.