1 #ifndef __JMATH__JMATH__
2 #define __JMATH__JMATH__
22 namespace JPP {
using namespace JMATH; }
24 namespace JGEOMETRY3D {
class JQuaternion3D; }
41 inline T pow(
const T&
x,
const double y);
108 template<
class JFirst_t,
class JSecond_t = JNullType>
156 return T(
object).negate();
169 return object.add(value);
182 return object.sub(value);
195 return object.mul(factor);
208 return object.div(factor);
221 return T(first).add(second);
234 return T(first).sub(second);
247 return T(
object).mul(factor);
260 return T(
object).mul(factor);
273 return T(
object).div(factor);
285 return (static_cast<T&>(*
this) =
T().
mul(static_cast<const T&>(*
this),
object));
311 return T().mul(first, second);
325 static_cast<T*
>(
this)->
mul(1.0 - alpha);
326 static_cast<T*
>(
this)->add(
T(
object).mul(alpha));
328 return static_cast<T&
>(*this);
345 template<
class JFirst_t,
class JSecond_t>
354 JFirst_t&
mul(
const JSecond_t&
object)
356 return static_cast<JFirst_t&
>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*
this),
object);
369 return first.mul(second);
382 return JFirst_t(first).mul(second);
401 return T(first).interpolate(second, alpha);
408 template<
class JValue_t>
430 for (
T i = __begin;
i != __end; ++
i) {
442 this->
value = getZero<JValue_t>();
452 operator JValue_t ()
const
469 this->value +=
value;
494 typename std::iterator_traits<T>::value_type
getAverage(T __begin, T __end)
496 typedef typename std::iterator_traits<T>::value_type value_type;
508 template<
class JValue_t,
size_t N>
511 typedef JValue_t value_type;
523 template<
class JElement_t,
class JAllocator_t>
539 typename std::iterator_traits<T>::value_type
getAverage(
T __begin,
T __end,
typename std::iterator_traits<T>::value_type value)
544 catch(
const std::exception&) {
557 template<
class JValue_t,
size_t N>
563 catch(
const std::exception&) {
576 template<
class JElement_t,
class JAllocator_t>
582 catch(
const std::exception&) {
friend T & operator/=(T &object, const double factor)
Scale object.
static T pow(const T &x, const double y, const JLANG::JBool< false > option)
Power .
Auxiliary base class for aritmetic operations of derived class types.
friend T operator-(const T &object)
Negate operator.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
T & interpolate(const T &object, const double alpha)
Interpolation between objects.
friend T operator*(const double factor, const T &object)
Scale object.
T interpolate(const T &first, const T &second, const double alpha)
Interpolation between objects.
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average.
friend T & operator+=(T &object, const T &value)
Add object.
Definition of zero value for any class.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
void put(const JValue_t &value, const double w=1.0)
Put value.
friend T & operator*=(T &first, const T &second)
Multiply with object.
T getZero()
Get zero value for a given data type.
friend JFirst_t operator*(const JFirst_t &first, const JSecond_t &second)
Multiply objects.
JArgument< T >::argument_type argument_type
friend JFirst_t & operator*=(JFirst_t &first, const JSecond_t &second)
Multiply with object.
friend T operator+(const T &object)
Affirm operator.
Auxiliary template class for type bool.
JAverage()
Default constructor.
static T pow(const T &x, const double y, const JLANG::JBool< true > option)
Power .
JAverage(T __begin, T __end)
Constructor.
Auxiliary class to hide data type specific methods.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Auxiliary class for no type definition.
T pow(const T &x, const double y)
Power .
JFirst_t & mul(const JSecond_t &object)
Multiply with object.
friend T operator+(const T &first, const T &second)
Add objects.
friend T operator*(const T &object, const double factor)
Scale object.
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
Data structure for unit quaternion in three dimensions.
Template for generic class types.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Exception for division by zero.
friend T & operator-=(T &object, const T &value)
Subtract object.
friend T operator-(const T &first, const T &second)
Subtract objects.
friend T & operator*=(T &object, const double factor)
Scale object.
friend T operator/(const T &object, const double factor)
Scale object.
T & mul(const T &object)
Multiply with object.
Auxiliary data structure for return type of make methods.
friend T operator*(const T &first, const T &second)
Multiply objects.
Auxiliary class to determine average of set of values.