1 #ifndef CLASSIC_LinearFun_HH
2 #define CLASSIC_LinearFun_HH
25 template <
class T,
int N>
class FVector;
26 template <
class T,
int N>
class LinearMap;
27 template <
class T,
int M,
int N>
class FMatrix;
38 template <
class T,
int N>
154 std::istream &
get(std::istream &
is);
157 std::ostream &
put(std::ostream &os)
const;
172 template <
class T,
int N>
176 template <
class T,
int N>
180 template <
class T,
int N>
184 template <
class T,
int N>
188 template <
class T,
int N>
192 template <
class T,
int N>
196 template <
class T,
int N>
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>
233 std::ostream &operator<<(std::ostream &os, const LinearFun<T, N> &);
240 #endif // CLASSIC_LinearFun_HH
A templated representation for vectors.
Linear map with values of type [b]T[/b] in [b]N[/b] variables.
bool operator!=(const Offset &off1, const Offset &off2)
LinearFun operator+() const
Unary plus.
LinearFun multiply(const LinearFun &y) const
Multiplication truncated to order one.
Matrix< T > operator-(const Matrix< T > &, const Matrix< T > &)
Matrix subtraction.
LinearFun inverse() const
Approximate reciprocal value 1/(*this).
LinearFun & operator/=(const LinearFun &y)
Approximate division and assignation.
Linear function in N variables of type T.
bool operator==(const TwoPolynomial &left, const TwoPolynomial &right)
LinearFun & operator+=(const LinearFun &y)
Add and assign.
const T operator[](int index) const
Get coefficient.
Matrix< T > operator*(const Matrix< T > &, const Matrix< T > &)
Matrix multiply.
std::ostream & put(std::ostream &os) const
Write LinearFun on the stream [b]os[/b].
LinearFun taylor(const T series[2]) const
Taylor series.
void setCoefficient(int index, const T &value)
Set coefficient.
static LinearFun makeVariable(int var)
Make variable.
LinearFun< T, N > substitute(const LinearMap< T, N > &m) const
Substitute.
A templated representation for matrices.
LinearFun & operator*=(const LinearFun &y)
Multiply and assign.
Matrix< T > operator+(const Matrix< T > &, const Matrix< T > &)
Matrix addition.
LinearFun & operator=(const T &y)
Convert and assign.
T evaluate(const FVector< T, N > &) const
Evaluate LinearFun at point.
bool operator==(const LinearFun &y) const
Equality operator.
LinearFun operator-() const
Unary minus.
LinearFun()
Default constructor.
b mention the algorithm in the References section The appropriate citation is
std::istream & operator>>(std::istream &, Tps< T > &x)
Extract from stream.
LinearFun & operator-=(const LinearFun &y)
Subtract and assign.
const T getCoefficient(int index) const
Get coefficient.
Matrix< T > operator/(const Matrix< T > &, const T &)
Matrix divided by scalar.
bool operator!=(const LinearFun &y) const
Inequality operator.
T data[N+1]
Representation.