1 #ifndef __JMATHTOOLKIT__
2 #define __JMATHTOOLKIT__
29 namespace JPP {
using namespace JMATH; }
62 inline long long int factorial(
const long long int n,
const long long int m)
64 if (n < 0 || m < 0 || n < m) {
85 template<
class JFirst_t,
class JSecond_t>
87 const JSecond_t& second,
88 const double precision = std::numeric_limits<double>::min())
90 return first.equals(second, precision);
101 template<
class JFirst_t,
class JSecond_t>
103 const JSecond_t& second)
105 return first.getDistanceSquared(second);
116 template<
class JFirst_t,
class JSecond_t>
118 const JSecond_t& second)
120 return first.getDistance(second);
131 template<
class JFirst_t,
class JSecond_t>
132 inline double getDot(
const JFirst_t& first,
133 const JSecond_t& second)
135 return first.getDot(second);
146 template<
class JFirst_t,
class JSecond_t>
148 const JSecond_t& second)
150 const double dot =
getDot(first,second);
154 else if (dot <= -1.0)
157 return acos(dot) * 180.0 / acos(-1.0);
168 template<
class JFirst_t,
class JSecond_t>
170 const JSecond_t& second)
172 return first.getPerpDot(second);
187 return T().getCross(first, second);
201 const size_t k = kernel.size();
202 const size_t n = input .size() - k + 1;
206 for (
size_t i = 0; i !=
n; ++i) {
207 for (
size_t j = 0;
j !=
k; ++
j) {
208 out[i] += input[i +
j] * kernel[k -
j - 1];
double getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions.
double getDot(const JNeutrinoDirection &first, const JNeutrinoDirection &second)
Dot product.
then fatal No sound hydrophone file $HYDROPHONE_TXT fi JGraph f $HYDROPHONE_TXT o $HYDROPHONE_ROOT sort gr k
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
double getDistanceSquared(const JFirst_t &first, const JSecond_t &second)
Get square of distance between objects.
Definition of zero value for any class.
double getPerpDot(const JFirst_t &first, const JSecond_t &second)
Get perpendicular dot product of objects.
long long int factorial(const long long int n)
Determine factorial.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
alias put_queue eval echo n
std::vector< T > convolve(const std::vector< T > &input, const std::vector< T > &kernel)
Convolute data with given kernel.
bool equals(const JFirst_t &first, const JSecond_t &second, const double precision=std::numeric_limits< double >::min())
Check equality.
Exception for accessing a value in a collection that is outside of its range.
T getCross(const T &first, const T &second)
Get cross product of objects.