Jpp  17.3.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
JMATH::JMath< JFirst_t, JSecond_t > Struct Template Reference

Auxiliary base class for aritmetic operations of derived class types. More...

#include <JMath.hh>

Inheritance diagram for JMATH::JMath< JFirst_t, JSecond_t >:
JACOUSTICS::JKatoomba< JType >::H_t JACOUSTICS::JModel JACOUSTICS::JMODEL::JEmitter JACOUSTICS::JMODEL::JString JTOOLS::JArray< NUMBER_OF_DIMENSIONS, abscissa_type > JTOOLS::JArray< NUMBER_OF_DIMENSIONS, argument_type > JTOOLS::JCollection< JElement2D< JKey_t, JHistogram_t >, JDistance_t > JTOOLS::JCollection< JElement2D< JKey_t, JValue_t >, JDistance_t > JTOOLS::JCollection< JElement2D_t > JCOMPASS::JModel JDATABASE::JPBSSequences JDATABASE::JSelector JFIT::JEnergy JFIT::JLine3EZ JFIT::JLine3Z JFIT::JShower3EZ JFIT::JShower3Z JFIT::JShowerEH JGEOMETRY2D::JAngle2D JGEOMETRY2D::JVector2D JGEOMETRY3D::JAngle3D JGEOMETRY3D::JEulerAngle3D JGEOMETRY3D::JQuaternion3D JGEOMETRY3D::JQuaternion3D JGEOMETRY3D::JQuaternion3D JGEOMETRY3D::JQuaternion3D JGEOMETRY3D::JRotation3D JGEOMETRY3D::JVector3D JGEOMETRY3D::JVersor3D JGEOMETRY3D::JVersor3Z JGEOMETRY3D::JVertex3D JTOOLS::JMap< JKey_t, JHistogram_t, JDistance_t > JTOOLS::JRange< counter_type > JTOOLS::JRange< double > JTOOLS::JRange< int > JTOOLS::JRange< JAbscissa_t > JTOOLS::JRange< JDAQHit::JTOT_t > JTOOLS::JTable2D< N, N, JData_t > JTOOLS::JArray< N, T > JTOOLS::JArray< 1, T > JTOOLS::JBin2D< JAbscissa_t, JOrdinate_t > JTOOLS::JCollection< JElement_t, JDistance_t > JTOOLS::JHistogram1D< JElement_t, JContainer_t, JDistance_t > JTOOLS::JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t > JTOOLS::JMap< JKey_t, JValue_t, JDistance_t > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JTail_t >, JDistance_t > JTOOLS::JQuantile JTOOLS::JRange< T, JComparator_t > JTOOLS::JResultDerivative< JResult_t > JTOOLS::JResultHesse< JResult_t > JTOOLS::JResultPDF< JResult_t > JTOOLS::JResultPolynome< N, JResult_t > JTOOLS::JTable2D< NX, NY, JData_t > JTOOLS::JTuple< T > JTOOLS::JTuple< JTypeList< JHead_t, JTail_t > > JTOOLS::JTuple< JTypeList< JHead_t, JTypeList< JTail_t, JNullType > > > JTOOLS::JTuple< JHead_t > JTOOLS::JTuple< JTail_t > JUTM::JUTMPosition

Public Member Functions

JFirst_t & mul (const JSecond_t &object)
 Multiply with object. More...
 

Friends

JFirst_t & operator*= (JFirst_t &first, const JSecond_t &second)
 Multiply with object. More...
 
JFirst_t operator* (const JFirst_t &first, const JSecond_t &second)
 Multiply objects. More...
 

Detailed Description

template<class JFirst_t, class JSecond_t = JNullType>
struct JMATH::JMath< JFirst_t, JSecond_t >

Auxiliary base class for aritmetic operations of derived class types.

Specialisation of JMath for two data types.

This class provides for the object multiplication operators *= *. The template parameter should then have the member method:

      JFirst_t& mul(const JFirst_t&, const JSecond_t&);

where JFirst_t and JSecond_t refer to the first and second template parameter, respectively.

This class uses in-class friend operators (see Barton-Nackman trick).

Definition at line 109 of file JMath.hh.

Member Function Documentation

template<class JFirst_t, class JSecond_t = JNullType>
JFirst_t& JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t &  object)
inline

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355  {
356  return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357  }

Friends And Related Function Documentation

template<class JFirst_t, class JSecond_t = JNullType>
JFirst_t& operator*= ( JFirst_t &  first,
const JSecond_t &  second 
)
friend

Multiply with object.

Parameters
firstfirst object
secondsecond object
Returns
result object

Definition at line 367 of file JMath.hh.

368  {
369  return first.mul(second);
370  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
JFirst_t operator* ( const JFirst_t &  first,
const JSecond_t &  second 
)
friend

Multiply objects.

Parameters
firstfirst object
secondsecond object
Returns
result object

Definition at line 380 of file JMath.hh.

381  {
382  return JFirst_t(first).mul(second);
383  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first

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