1 #ifndef __JMATHTOOLKIT__
2 #define __JMATHTOOLKIT__
28 namespace JPP {
using namespace JMATH; }
61 inline long long int factorial(
const long long int n,
const long long int m)
63 if (n < 0 || m < 0 || n < m) {
84 template<
class JFirst_t,
class JSecond_t>
86 const JSecond_t& second,
87 const double precision = std::numeric_limits<double>::min())
89 return first.equals(second, precision);
100 template<
class JFirst_t,
class JSecond_t>
102 const JSecond_t& second)
104 return first.getDistanceSquared(second);
115 template<
class JFirst_t,
class JSecond_t>
117 const JSecond_t& second)
119 return first.getDistance(second);
130 template<
class JFirst_t,
class JSecond_t>
131 inline double getDot(
const JFirst_t& first,
132 const JSecond_t& second)
134 return first.getDot(second);
145 template<
class JFirst_t,
class JSecond_t>
147 const JSecond_t& second)
149 const double dot =
getDot(first,second);
153 else if (dot <= -1.0)
156 return acos(dot) * 180.0 / acos(-1.0);
167 template<
class JFirst_t,
class JSecond_t>
169 const JSecond_t& second)
171 return first.getPerpDot(second);
189 return T(first).interpolate(second, alpha);
202 const int k = ker.size();
203 const int n = in.size() - k + 1;
207 for (
int i = 0; i <
n; i++) {
208 for (
int j = 0;
j <
k;
j++) {
209 out[i] += in[i +
j] * ker[k -
j - 1];
*fatal Wrong number of arguments esac JCookie sh JRuns D $DETECTOR d sort n k
double getAngle(const JFirst_t &first, const JSecond_t &second)
Get space angle between objects.
double getDot(const JNeutrinoDirection &first, const JNeutrinoDirection &second)
Dot product.
#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.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
T interpolate(const T &first, const T &second, const double alpha)
Interpolation between objects.
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
std::vector< T > convolve(const std::vector< T > &in, const std::vector< T > &ker)
Convolves a vector (in) with another vector (ker).
alias put_queue eval echo n
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.