template
class
LinearFun<class,int>
(Return to index)
Linear function in N variables of type T.
All divide operations throw DivideError,
if the constant part of the divisor is zero.
The copy constructor, destructor, and assignment operator generated
by the compiler do the correct thing, and are not defined for speed.
Type: |
Instantiable |
Include file: |
./FixedAlgebra/LinearFun.hh |
Synopsis (including inherited members):
Documentation:
- Public members:
-
LinearFun
()
;
- Default constructor.
Construct zero value.
-
LinearFun
(const T&)
;
- Conversion.
-
LinearFun
(int)
;
- Conversion.
-
T evaluate
(const FVector<T,N>&)const
;
- Evaluate LinearFun at point.
-
std::istream& get
(std::istream&)
;
- Read LinearFun on the stream is.
-
const T getCoefficient
(int)const
;
- Get coefficient.
Return value of the coefficient denoted by the index.
The index zero stands for the constant term,
any other value selects the derivative by the variable index+1.
Return zero, if index is out of range.
-
LinearFun inverse
()const
;
- Approximate reciprocal value 1/(*this).
-
static LinearFun makeVariable
(int)
;
- Make variable.
Construct the variable identified by the index var,
with total of nVar variables.
-
LinearFun multiply
(const LinearFun&)const
;
- Multiplication truncated to order one.
-
bool operator!=
(const LinearFun&)const
;
- Inequality operator.
-
bool operator!=
(const T&)const
;
- Inequality with constant.
-
LinearFun& operator*=
(const LinearFun&)
;
- Multiply and assign.
-
LinearFun& operator*=
(const T&)
;
- Multiply by constant and assign.
-
LinearFun operator+
()const
;
- Unary plus.
-
LinearFun& operator+=
(const LinearFun&)
;
- Add and assign.
-
LinearFun& operator+=
(const T&)
;
- Add constant and assign.
-
LinearFun operator-
()const
;
- Unary minus.
-
LinearFun& operator-=
(const LinearFun&)
;
- Subtract and assign.
-
LinearFun& operator-=
(const T&)
;
- Subtract constant and assign.
-
LinearFun& operator/=
(const LinearFun&)
;
- Approximate division and assignation.
-
LinearFun& operator/=
(const T&)
;
- Divide by constant and assign.
-
LinearFun& operator=
(const T&)
;
- Convert and assign.
-
bool operator==
(const LinearFun&)const
;
- Equality operator.
-
bool operator==
(const T&)const
;
- Equality with constant.
-
inline const T operator[]
(int)const
;
- Get coefficient.
Return value of the coefficient denoted by the index.
The index zero stands for the constant term,
any other value selects the derivative by the variable index+1.
Result is undefined, if index is out of range.
-
inline T& operator[]
(int)
;
- Get coefficient.
Return a reference to the coefficient denoted by the index.
Result is undefined, if index is out of range.
The index zero stands for the constant term,
any other value selects the derivative by the variable index+1.
Use as a lvalue is only allowed when the LinearFun is unique().
-
std::ostream& put
(std::ostream&)const
;
- Write LinearFun on the stream os.
-
void setCoefficient
(int,const T&)
;
- Set coefficient.
Assign value of the coefficient denoted by the index.
The index zero stands for the constant term,
any other value selects the derivative by the variable index+1.
Ignore, if index is out of range.
-
LinearFun<T,N> substitute
(const LinearMap<T,N>&)const
;
- Substitute.
Substitute map m in LinearFun, giving new LinearFun.
-
LinearFun<T,N> substitute
(const FMatrix<T,N,N>&)const
;
- Substitute.
Substitute matrix M in LinearFun, giving new LinearFun.
-
LinearFun taylor
(const T[2])const
;
- Taylor series.
Expand Taylor series with coefficiens series and order one.
Documentation generated by fci on Mon Feb 7 11:41:41 2000