Class documentation of Concepts

Loading...
Searching...
No Matches
basis.hh
Go to the documentation of this file.
1
7#ifndef fncbasis_hh
8#define fncbasis_hh
9
11#include "space/space.hh"
12
13namespace concepts {
14
15 // ************************************************************** Function **
16
20 template<class F>
21 class Function : public virtual OutputOperator {
22 public:
24 template<class G>
25 inline Function(const Space<G>& spc) : dim_(spc.dim()) {}
26 inline Function(const uint dim) : dim_(dim) {}
27
29 virtual Function<F>& operator=(const Function<F>& fnc) = 0;
30
32 virtual F& operator()(uint i) = 0;
34 virtual F operator()(uint i) const = 0;
35
39 virtual Function<F>& operator+=(F c);
40
44 virtual Function<F>& operator-=(F c);
45
47 virtual Function<F>& operator*=(F a);
48
50 virtual Function<F>& add(const Function<F>& fnc, F a);
51
53 uint dim() const { return dim_; }
54 protected:
55 virtual std::ostream& info(std::ostream& os) const;
58 };
59
60} // namespace concepts
61
62#endif // fncbasis_hh
uint dim_
Dimension of the function (or of the space the function is defined)
Definition basis.hh:57
virtual Function< F > & operator-=(const Function< F > &fnc)
Subtraction operator.
Function(const Space< G > &spc)
Constructor.
Definition basis.hh:25
virtual Function< F > & operator*=(F a)
Scaling operator.
uint dim() const
Returns the dimension of the function.
Definition basis.hh:53
virtual F operator()(uint i) const =0
Index operator.
virtual Function< F > & operator=(const Function< F > &fnc)=0
Assignment operator.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Function< F > & operator+=(F c)
Addition operator.
virtual Function< F > & add(const Function< F > &fnc, F a)
Adds a times fnc to this function.
virtual Function< F > & operator+=(const Function< F > &fnc)
Addition operator.
virtual F & operator()(uint i)=0
Index operator.
virtual Function< F > & operator-=(F c)
Subtraction operator.
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320