1 #ifndef CLASSIC_TransportFun_HH
2 #define CLASSIC_TransportFun_HH
25 template <
class T,
int N>
class FVector;
27 template <
class T,
int M,
int N>
class FMatrix;
39 template <
class T,
int N>
179 std::istream &
get(std::istream &is);
182 std::ostream &
put(std::ostream &os)
const;
187 static const int SIZE = (N + 1) *(N + 2) / 2;
200 template <
class T,
int N>
204 template <
class T,
int N>
208 template <
class T,
int N>
212 template <
class T,
int N>
216 template <
class T,
int N>
220 template <
class T,
int N>
224 template <
class T,
int N>
228 template <
class T,
int N>
232 template <
class T,
int N>
236 template <
class T,
int N>
240 template <
class T,
int N>
244 template <
class T,
int N>
248 template <
class T,
int N>
252 template <
class T,
int N>
256 template <
class T,
int N>
260 template <
class T,
int N>
bool operator==(const T &, const TransportFun< T, N > &)
Equality.
std::istream & operator>>(std::istream &is, TransportFun< T, N > &)
Extract TransportFun from stream [b]is[/b].
TransportFun< T, N > operator*(const TransportFun< T, N > &, const TransportFun< T, N > &)
Multiply.
std::ostream & operator<<(std::ostream &os, const TransportFun< T, N > &)
Insert TransportFun to stream [b]os[/b].
bool operator!=(const T &, const TransportFun< T, N > &)
Inequality.
TransportFun< T, N > operator/(const TransportFun< T, N > &, const TransportFun< T, N > &)
Divide.
TransportFun< T, N > operator+(const TransportFun< T, N > &, const TransportFun< T, N > &)
Add.
TransportFun< T, N > operator-(const TransportFun< T, N > &, const TransportFun< T, N > &)
Subtract.
A templated representation for matrices.
A templated representation for vectors.
Transport map with values of type [b]T[/b] in [b]N[/b] variables.
Transport function in N variables of type T.
const T getCoefficient(int index) const
Get coefficient.
static TransportFun makeVariable(int var)
Make variable.
TransportFun multiply(const TransportFun &y) const
Multiplication truncated to order one.
T evaluate(const FVector< T, N > &) const
Evaluate TransportFun at point.
TransportFun & operator+=(const TransportFun &y)
Add and assign.
TransportFun< T, N > multiplyVariable(int var) const
Multiply by variable var.
T data[SIZE]
Representation.
void setCoefficient(int index, const T &value)
Set coefficient.
TransportFun taylor(const T series[2]) const
Taylor series.
bool operator!=(const TransportFun &y) const
Inequality operator.
TransportFun< T, N > substitute(const TransportMap< T, N > &m) const
Substitute.
TransportFun operator-() const
Unary minus.
TransportFun operator+() const
Unary plus.
const T operator[](int) const
Get coefficient.
TransportFun & operator/=(const TransportFun &y)
Approximate division and assignation.
TransportFun()
Default constructor.
bool operator==(const TransportFun &y) const
Equality operator.
std::ostream & put(std::ostream &os) const
Write TransportFun on the stream [b]os[/b].
std::istream & get(std::istream &is)
Read TransportFun on the stream [b]is[/b].
const T operator()(int i1, int i2) const
Get coefficient.
TransportFun inverse() const
Approximate reciprocal value 1/(*this).
static const int SIZE
Size of representation.
TransportFun & operator*=(const TransportFun &y)
Multiply and assign.
TransportFun & operator=(const T &y)
Convert and assign.
TransportFun & operator-=(const TransportFun &y)
Subtract and assign.