Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer Class Reference

Default implementation of weight application and coordinate transformation of function. More...

#include <JMultiMapTransformer.hh>

Inheritance diagram for JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer:
JTOOLS::JMultiMapTransformer< N, JArgument_t > JLANG::JClonable< JClass_t > JIO::JSerialisable

Public Types

typedef JMultiMapTransformer
< N, JArgument_t > 
multimaptransformer_type
 
typedef JClonable
< multimaptransformer_type >
::clone_type 
clone_type
 
typedef JArgument_t argument_type
 
typedef JArray< N, argument_typearray_type
 
typedef const JArray< N, const
argument_type
const_array_type
 

Public Member Functions

 JMultiMapDefaultTransformer ()
 Default constructor. More...
 
virtual clone_type clone () const
 Clone object. More...
 
virtual argument_type putXn (const_array_type &buffer, const argument_type xn) const
 Evaluate xn value as a function of {x0, ..., xn-1}. More...
 
virtual argument_type getXn (const_array_type &buffer, const argument_type xn) const
 Evaluate xn value as a function of {x0, ..., xn-1}. More...
 
virtual double getWeight (const_array_type &buffer) const
 Weight function. More...
 
virtual JReaderread (JReader &in)
 Read from input. More...
 
virtual JWriterwrite (JWriter &out) const
 Write to output. More...
 
double getWeight (const argument_type x,...) const
 Weight function. More...
 

Static Public Member Functions

static const JMultiMapTransformergetDefaultTransformer ()
 Get default transformer. More...
 
static JMultiMapTransformergetClone ()
 Get clone of default transformer. More...
 

Detailed Description

template<unsigned int N, class JArgument_t>
class JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer

Default implementation of weight application and coordinate transformation of function.

The coordiniate transformation has no effect and the weight is equal to one.

This class implements the JMultiMapTransformer, JClonable and JSerialisable interfaces.

Definition at line 144 of file JMultiMapTransformer.hh.

Member Typedef Documentation

template<unsigned int N, class JArgument_t>
typedef JMultiMapTransformer<N, JArgument_t> JTOOLS::JMultiMapTransformer< N, JArgument_t >::multimaptransformer_type
inherited

Definition at line 41 of file JMultiMapTransformer.hh.

template<unsigned int N, class JArgument_t>
typedef JClonable<multimaptransformer_type>::clone_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::clone_type
inherited

Definition at line 43 of file JMultiMapTransformer.hh.

template<unsigned int N, class JArgument_t>
typedef JArgument_t JTOOLS::JMultiMapTransformer< N, JArgument_t >::argument_type
inherited

Definition at line 44 of file JMultiMapTransformer.hh.

template<unsigned int N, class JArgument_t>
typedef JArray<N, argument_type> JTOOLS::JMultiMapTransformer< N, JArgument_t >::array_type
inherited

Definition at line 45 of file JMultiMapTransformer.hh.

template<unsigned int N, class JArgument_t>
typedef const JArray<N, const argument_type> JTOOLS::JMultiMapTransformer< N, JArgument_t >::const_array_type
inherited

Definition at line 46 of file JMultiMapTransformer.hh.

Constructor & Destructor Documentation

template<unsigned int N, class JArgument_t>
JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer::JMultiMapDefaultTransformer ( )
inline

Default constructor.

Definition at line 152 of file JMultiMapTransformer.hh.

153  {}

Member Function Documentation

template<unsigned int N, class JArgument_t>
virtual clone_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer::clone ( ) const
inlinevirtual

Clone object.

Returns
pointer to newly created transformer

Implements JLANG::JClonable< JClass_t >.

Definition at line 161 of file JMultiMapTransformer.hh.

162  {
163  return new JMultiMapDefaultTransformer(*this);
164  }
template<unsigned int N, class JArgument_t>
virtual argument_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer::putXn ( const_array_type buffer,
const argument_type  xn 
) const
inlinevirtual

Evaluate xn value as a function of {x0, ..., xn-1}.

Parameters
bufferx0 - xn-1 values
xnxn value
Returns
xn value

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 174 of file JMultiMapTransformer.hh.

175  {
176  return xn;
177  }
template<unsigned int N, class JArgument_t>
virtual argument_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer::getXn ( const_array_type buffer,
const argument_type  xn 
) const
inlinevirtual

Evaluate xn value as a function of {x0, ..., xn-1}.

Parameters
bufferx0 - xn-1 values
xnxn value
Returns
xn value

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 187 of file JMultiMapTransformer.hh.

188  {
189  return xn;
190  }
template<unsigned int N, class JArgument_t>
virtual double JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer::getWeight ( const_array_type buffer) const
inlinevirtual

Weight function.

Parameters
bufferx0 - xn-1 values
Returns
weight

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 199 of file JMultiMapTransformer.hh.

200  {
201  return 1.0;
202  }
template<unsigned int N, class JArgument_t>
virtual JReader& JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer::read ( JReader in)
inlinevirtual

Read from input.

This method reads nothing.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 213 of file JMultiMapTransformer.hh.

214  {
215  return in;
216  }
template<unsigned int N, class JArgument_t>
virtual JWriter& JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer::write ( JWriter out) const
inlinevirtual

Write to output.

This method writes nothing.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 227 of file JMultiMapTransformer.hh.

228  {
229  return out;
230  }
template<unsigned int N, class JArgument_t>
double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight ( const argument_type  x,
  ... 
) const
inlineinherited

Weight function.

Parameters
xcomma seperated list of abscissa values
Returns
weight

Definition at line 84 of file JMultiMapTransformer.hh.

85  {
86  va_start(ap, x);
87 
88  buffer[0] = x;
89 
90  for (int i = 1; i != N; ++i) {
91  buffer[i] = va_arg(ap, argument_type);
92  }
93 
94  va_end(ap);
95 
96  return getWeight(buffer);
97  }
virtual double getWeight(const_array_type &buffer) const =0
Weight function.
JArray< N, argument_type > buffer
template<unsigned int N, class JArgument_t>
static const JMultiMapTransformer& JTOOLS::JMultiMapTransformer< N, JArgument_t >::getDefaultTransformer ( )
inlinestaticinherited

Get default transformer.

Returns
default transformer

Definition at line 111 of file JMultiMapTransformer.hh.

112  {
113  static const JMultiMapDefaultTransformer transformer;
114 
115  return transformer;
116  }
template<unsigned int N, class JArgument_t>
static JMultiMapTransformer* JTOOLS::JMultiMapTransformer< N, JArgument_t >::getClone ( )
inlinestaticinherited

Get clone of default transformer.

Returns
pointer to newly created transformer

Definition at line 124 of file JMultiMapTransformer.hh.

125  {
126  return new JMultiMapDefaultTransformer();
127  }

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