6 #ifndef MYRAMATH_DENSE_VECTORRANGE_H 7 #define MYRAMATH_DENSE_VECTORRANGE_H 15 #include <myramath/utility/detail/LIBPUBLIC.h> 24 template<
int Arity,
class Number>
class Expression;
25 template<
class Number>
class MatrixRange;
26 template<
class Number>
class CMatrixRange;
27 template<
class Number>
class VectorRange;
28 template<
class Number>
class CVectorRange;
29 template<
class T>
class Array1;
34 template<
class Number>
class LIBPUBLIC VectorRange
87 Number& operator() (
int n)
const;
88 Number& operator[] (
int n)
const;
91 Number& at(
int n)
const;
102 Pair split_first(
int n)
const;
111 Pair split_last(
int n)
const;
117 template<
class Functor>
void transform(
const Functor& f)
const 119 for (
int n = 0; n < N; ++n)
120 *pointer(n) = f( *pointer(n) );
142 void operator *= (Number alpha)
const;
145 void operator /= (Number alpha)
const;
153 Number* pointer(
int n)
const;
159 void check_size(
int S)
const;
164 template<
class Number>
class LIBPUBLIC CVectorRange
183 CVectorRange(
const Number* in_begin,
int in_N);
214 const Number& operator() (
int n)
const;
215 const Number& operator[] (
int n)
const;
218 const Number& at(
int n)
const;
229 Pair split_first(
int n)
const;
238 Pair split_last(
int n)
const;
243 const Number* pointer(
int n)
const;
249 {
public:
typedef Number type; };
253 {
public:
typedef Number type; };
272 LIBPUBLIC std::ostream& operator << (std::ostream& out, const CVectorRange<NumberS>& v);
274 LIBPUBLIC std::ostream& operator << (std::ostream& out, const CVectorRange<NumberD>& v);
275 LIBPUBLIC std::ostream& operator << (std::ostream& out, const CVectorRange<NumberC>& v);
276 LIBPUBLIC std::ostream& operator << (std::ostream& out, const CVectorRange<NumberZ>& v);
Reflects Number trait for a Container, containers of Numbers (Matrix's, Vector's, etc) should special...
Definition: Number.h:55
Represents a mutable VectorRange.
Definition: axpy.h:21
void transform(const Functor &f) const
Overwrites every x(n) in this VectorRange with f(x(n)).
Definition: VectorRange.h:117
int N
---------— Data members, all public ----------------—
Definition: VectorRange.h:41
Represents a const MatrixRange.
Definition: bothcat.h:22
Abstraction layer, serializable objects write themselves to these.
Definition: Streams.h:39
Various utility functions/classes related to scalar Number types.
int N
---------— Data members, all public ----------------—
Definition: VectorRange.h:171
Represents a mutable MatrixRange.
Definition: conjugate.h:26
Represents a const VectorRange.
Definition: axpy.h:20
Container of values, allows random (i) access.
Definition: Array1.h:32
Given an index (i,j,etc), returns a value.
Definition: arithmetic.h:19
Represents a const intRange.
Definition: intRange.h:142