Jpp
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
JTOOLS::JMultiMapTransformer< N, JArgument_t > Class Template Referenceabstract

Interface for weight application and coordinate transformation of function. More...

#include <JMultiMapTransformer.hh>

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

Classes

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

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
 

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

const typedef JArray< N, const argument_typeconst_array_type
 

Private Attributes

va_list ap
 
JArray< N, argument_typebuffer
 

Detailed Description

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

Interface for weight application and coordinate transformation of function.

The template parameters refer to the dimension of the map and the data type of the argument, respectively.

This class extends the JClonable and JSerialisable interfacea.

Definition at line 35 of file JMultiMapTransformer.hh.

Member Typedef Documentation

◆ multimaptransformer_type

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

Definition at line 41 of file JMultiMapTransformer.hh.

◆ clone_type

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

Definition at line 43 of file JMultiMapTransformer.hh.

◆ argument_type

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

Definition at line 44 of file JMultiMapTransformer.hh.

◆ array_type

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

Definition at line 45 of file JMultiMapTransformer.hh.

Member Function Documentation

◆ putXn()

template<unsigned int N, class JArgument_t>
virtual argument_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::putXn ( const_array_type buffer,
const argument_type  xn 
) const
pure virtual

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

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

Implemented in JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer.

◆ getXn()

template<unsigned int N, class JArgument_t>
virtual argument_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::getXn ( const_array_type buffer,
const argument_type  xn 
) const
pure virtual

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

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

Implemented in JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer.

◆ getWeight() [1/2]

template<unsigned int N, class JArgument_t>
virtual double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight ( const_array_type buffer) const
pure virtual

Weight function.

Parameters
bufferx0 - xn-1 values
Returns
weight

Implemented in JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer.

◆ getWeight() [2/2]

template<unsigned int N, class JArgument_t>
double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight ( const argument_type  x,
  ... 
) const
inline

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  }

◆ getDefaultTransformer()

template<unsigned int N, class JArgument_t>
static const JMultiMapTransformer& JTOOLS::JMultiMapTransformer< N, JArgument_t >::getDefaultTransformer ( )
inlinestatic

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  }

◆ getClone()

template<unsigned int N, class JArgument_t>
static JMultiMapTransformer* JTOOLS::JMultiMapTransformer< N, JArgument_t >::getClone ( )
inlinestatic

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  }

◆ clone()

template<class JClonable_t, class JDerived_t>
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlinevirtualinherited

◆ read()

virtual JReader& JIO::JSerialisable::read ( JReader in)
pure virtualinherited

◆ write()

virtual JWriter& JIO::JSerialisable::write ( JWriter out) const
pure virtualinherited

Member Data Documentation

◆ const_array_type

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

Definition at line 46 of file JMultiMapTransformer.hh.

◆ ap

template<unsigned int N, class JArgument_t>
va_list JTOOLS::JMultiMapTransformer< N, JArgument_t >::ap
mutableprivate

Definition at line 131 of file JMultiMapTransformer.hh.

◆ buffer

template<unsigned int N, class JArgument_t>
JArray<N, argument_type> JTOOLS::JMultiMapTransformer< N, JArgument_t >::buffer
mutableprivate

Definition at line 132 of file JMultiMapTransformer.hh.


The documentation for this class was generated from the following file:
JTOOLS::JMultiMapTransformer::ap
va_list ap
Definition: JMultiMapTransformer.hh:131
JTOOLS::JMultiMapTransformer::buffer
JArray< N, argument_type > buffer
Definition: JMultiMapTransformer.hh:132
JTOOLS::JMultiMapTransformer::getWeight
virtual double getWeight(const_array_type &buffer) const =0
Weight function.
JTOOLS::JMultiMapTransformer::argument_type
JArgument_t argument_type
Definition: JMultiMapTransformer.hh:44