Jpp  15.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
JMATH::JLegendre_t< JOrdinate_t > Struct Template Referenceabstract

Base class for Legendre polynome. More...

#include <JLegendre.hh>

Inheritance diagram for JMATH::JLegendre_t< JOrdinate_t >:
std::vector< JOrdinate_t > JMATH::JLegendre< JOrdinate_t,(size_t)-1 >

Public Types

typedef std::vector
< JOrdinate_t >
::const_iterator 
const_iterator
 
typedef std::vector
< JOrdinate_t >::iterator 
iterator
 
typedef std::vector
< JOrdinate_t >
::const_reverse_iterator 
const_reverse_iterator
 
typedef std::vector
< JOrdinate_t >
::reverse_iterator 
reverse_iterator
 

Public Member Functions

 JLegendre_t ()
 Default constructor. More...
 
 JLegendre_t (const double xmin, const double xmax)
 Constructor. More...
 
virtual ~JLegendre_t ()
 Virtual destructor. More...
 
virtual JOrdinate_t getValue (const double x) const =0
 Function value. More...
 
JOrdinate_t operator() (const double x) const
 Function value. More...
 
double getXmin () const
 Get minimal abscissa value. More...
 
double getXmax () const
 Get maximal abscissa value. More...
 
double getX (const double x) const
 Get normalised abscissa value. More...
 
void reset ()
 Reset. More...
 
void set (const double xmin, const double xmax)
 Set abscissa values. More...
 
template<class T >
void set (T __begin, T __end)
 Set abscissa values. More...
 

Protected Attributes

double xmin
 minimal abscissa More...
 
double xmax
 maximal abscissa More...
 

Friends

std::istream & operator>> (std::istream &in, JLegendre_t &object)
 Read Legendre polynome from input. More...
 
std::ostream & operator<< (std::ostream &out, const JLegendre_t &object)
 Write Legendre polynome to output. More...
 

Detailed Description

template<class JOrdinate_t>
struct JMATH::JLegendre_t< JOrdinate_t >

Base class for Legendre polynome.

Definition at line 26 of file JLegendre.hh.

Member Typedef Documentation

template<class JOrdinate_t>
typedef std::vector<JOrdinate_t>::const_iterator JMATH::JLegendre_t< JOrdinate_t >::const_iterator

Definition at line 29 of file JLegendre.hh.

template<class JOrdinate_t>
typedef std::vector<JOrdinate_t>::iterator JMATH::JLegendre_t< JOrdinate_t >::iterator

Definition at line 30 of file JLegendre.hh.

template<class JOrdinate_t>
typedef std::vector<JOrdinate_t>::const_reverse_iterator JMATH::JLegendre_t< JOrdinate_t >::const_reverse_iterator

Definition at line 31 of file JLegendre.hh.

template<class JOrdinate_t>
typedef std::vector<JOrdinate_t>::reverse_iterator JMATH::JLegendre_t< JOrdinate_t >::reverse_iterator

Definition at line 32 of file JLegendre.hh.

Constructor & Destructor Documentation

template<class JOrdinate_t>
JMATH::JLegendre_t< JOrdinate_t >::JLegendre_t ( )
inline

Default constructor.

Definition at line 38 of file JLegendre.hh.

38  :
39  xmin(-1.0),
40  xmax(+1.0)
41  {}
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double xmin
minimal abscissa
Definition: JLegendre.hh:204
template<class JOrdinate_t>
JMATH::JLegendre_t< JOrdinate_t >::JLegendre_t ( const double  xmin,
const double  xmax 
)
inline

Constructor.

Parameters
xminminimal abscissa value
xmaxmaximal abscissa value

Definition at line 50 of file JLegendre.hh.

51  :
52  xmin(xmin),
53  xmax(xmax)
54  {}
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double xmin
minimal abscissa
Definition: JLegendre.hh:204
template<class JOrdinate_t>
virtual JMATH::JLegendre_t< JOrdinate_t >::~JLegendre_t ( )
inlinevirtual

Virtual destructor.

Definition at line 60 of file JLegendre.hh.

61  {}

Member Function Documentation

template<class JOrdinate_t>
virtual JOrdinate_t JMATH::JLegendre_t< JOrdinate_t >::getValue ( const double  x) const
pure virtual

Function value.

Parameters
xabscissa value
Returns
function value

Implemented in JMATH::JLegendre< JOrdinate_t,(size_t)-1 >, and JMATH::JLegendre< JQuaternion3D,(size_t)-1 >.

template<class JOrdinate_t>
JOrdinate_t JMATH::JLegendre_t< JOrdinate_t >::operator() ( const double  x) const
inline

Function value.

Parameters
xabscissa value
Returns
function value

Definition at line 79 of file JLegendre.hh.

80  {
81  return this->getValue(x);
82  }
virtual JOrdinate_t getValue(const double x) const =0
Function value.
template<class JOrdinate_t>
double JMATH::JLegendre_t< JOrdinate_t >::getXmin ( ) const
inline

Get minimal abscissa value.

Returns
minimal abscissa value

Definition at line 90 of file JLegendre.hh.

91  {
92  return xmin;
93  }
double xmin
minimal abscissa
Definition: JLegendre.hh:204
template<class JOrdinate_t>
double JMATH::JLegendre_t< JOrdinate_t >::getXmax ( ) const
inline

Get maximal abscissa value.

Returns
maximal abscissa value

Definition at line 101 of file JLegendre.hh.

102  {
103  return xmax;
104  }
double xmax
maximal abscissa
Definition: JLegendre.hh:205
template<class JOrdinate_t>
double JMATH::JLegendre_t< JOrdinate_t >::getX ( const double  x) const
inline

Get normalised abscissa value.

Parameters
xabscissa value
Returns
normalised abscissa value

Definition at line 113 of file JLegendre.hh.

114  {
115  return 2.0 * (x - xmin) / (xmax - xmin) - 1.0;
116  }
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double xmin
minimal abscissa
Definition: JLegendre.hh:204
template<class JOrdinate_t>
void JMATH::JLegendre_t< JOrdinate_t >::reset ( )
inline

Reset.

Definition at line 122 of file JLegendre.hh.

123  {
124  for (iterator i = this->begin(); i != this->end(); ++i) {
125  *i = zero;
126  }
127  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
std::vector< JOrdinate_t >::iterator iterator
Definition: JLegendre.hh:30
template<class JOrdinate_t>
void JMATH::JLegendre_t< JOrdinate_t >::set ( const double  xmin,
const double  xmax 
)
inline

Set abscissa values.

Parameters
xminminimal abscissa value
xmaxmaximal abscissa value

Definition at line 136 of file JLegendre.hh.

138  {
139  this->xmin = xmin;
140  this->xmax = xmax;
141  }
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double xmin
minimal abscissa
Definition: JLegendre.hh:204
template<class JOrdinate_t>
template<class T >
void JMATH::JLegendre_t< JOrdinate_t >::set ( T  __begin,
T  __end 
)
inline

Set abscissa values.

The template argument T refers to an iterator of a data structure which should have the following data member:

  • double first; // which conforms with std::pair.
Parameters
__beginbegin of data
__endend of data

Definition at line 155 of file JLegendre.hh.

156  {
157  this->xmin = std::numeric_limits<double>::max();
158  this->xmax = std::numeric_limits<double>::lowest();
159 
160  for (T i = __begin; i != __end; ++i) {
161  if (i->first < this->xmin) { this->xmin = i->first; }
162  if (i->first > this->xmax) { this->xmax = i->first; }
163  }
164  }
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
double xmax
maximal abscissa
Definition: JLegendre.hh:205
do set_variable OUTPUT_DIRECTORY $WORKDIR T
double xmin
minimal abscissa
Definition: JLegendre.hh:204

Friends And Related Function Documentation

template<class JOrdinate_t>
std::istream& operator>> ( std::istream &  in,
JLegendre_t< JOrdinate_t > &  object 
)
friend

Read Legendre polynome from input.

Parameters
ininput stream
objectLegendre polynome
Returns
input stream

Definition at line 174 of file JLegendre.hh.

175  {
176  object.clear();
177 
178  for (JOrdinate_t x; in >> x; ) {
179  object.push_back(x);
180  }
181 
182  return in;
183  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:42
template<class JOrdinate_t>
std::ostream& operator<< ( std::ostream &  out,
const JLegendre_t< JOrdinate_t > &  object 
)
friend

Write Legendre polynome to output.

Parameters
outoutput stream
objectLegendre polynome
Returns
output stream

Definition at line 193 of file JLegendre.hh.

194  {
195  for (typename JLegendre_t::const_iterator i = object.begin(); i != object.end(); ++i) {
196  out << ' ' << *i;
197  }
198 
199  return out;
200  }
std::vector< JOrdinate_t >::const_iterator const_iterator
Definition: JLegendre.hh:29

Member Data Documentation

template<class JOrdinate_t>
double JMATH::JLegendre_t< JOrdinate_t >::xmin
protected

minimal abscissa

Definition at line 204 of file JLegendre.hh.

template<class JOrdinate_t>
double JMATH::JLegendre_t< JOrdinate_t >::xmax
protected

maximal abscissa

Definition at line 205 of file JLegendre.hh.


The documentation for this struct was generated from the following file: