operations.h
Go to the documentation of this file.
215 std::vector<mpf_t*> OrthogonalProjection(const std::vector<mpf_t*> & vec, const std::vector<mpf_t*> & projection_vector);
mpf_t * Negate(const mpf_t *x)
Calculates the negation of the supplied value.
mpf_t * Ceil(mpf_t *value)
Calculates the smallest integral value greater or equal than the supplied value.
mpf_t * Floor(mpf_t *value)
Calculates the largest integral value less or equal than the supplied value.
void ChangeNumberOfMpftValuesCached(int change)
Changes the number of mpf_t values currently in cache by the specified number.
mpf_t * GetGaussianRandomMpft(double mu, double sigma)
Calculates a random value with normal distribution (gaussian distribution).
mpf_t * Min(mpf_t *a, mpf_t *b)
Calculates the minimum of the two values.
int GetNumberOfMpftValuesCached()
Getter function for the number of mpf_t values which are currently cached.
mpf_t * Multiply2Exp(const mpf_t *a, int p)
Multiplies the value of parameter a by a factor of 2p.
std::string MpftToString(const mpf_t *value)
Converts an mpf_t value to a string representation of it.
std::vector< mpf_t * > Divide(const std::vector< mpf_t * > &a, const std::vector< mpf_t * > &b)
Performs element wise division of the two vectors.
std::vector< mpf_t * > Add(const std::vector< mpf_t * > &a, const std::vector< mpf_t * > &b)
Performs element wise addition of the two vectors.
std::vector< mpf_t * > Multiply(const std::vector< mpf_t * > &a, const std::vector< mpf_t * > &b)
Performs element wise multiplication of the two vectors.
mpf_t * Cos(mpf_t *x)
Calculates the cosine function of the supplied value.
bool IsUndefined(const mpf_t *value)
Checks whether the supplied value is the representation of an undefined value.
mpf_t * Tan(mpf_t *x)
Calculates the tangent function of the supplied value.
This file contains the available random number generators.
int Compare(const mpf_t *a, double b)
Compares the two parameters.
std::vector< mpf_t * > Clone(const std::vector< mpf_t * > &a)
Creates a copy of the supplied vector where each entry is cloned.
mpf_t * LoadMpft(std::ifstream *stream)
Recovers a mpf_t value from an input stream.
std::vector< mpf_t * > GetVector(const std::vector< double > &a)
Transforms the vector with double entries to a vector with mpf_t* values.
bool Equals(const std::vector< mpf_t * > &a, const std::vector< mpf_t * > &b)
Checks whether two mpf_t* vectors are equal.
mpf_t * GetPlusInfinity()
Calculates the representation of +infinity.
double Log2Double(mpf_t *value)
Calculates the base 2 logarithm of the specified value.
std::vector< mpf_t * > GetRandomVector(int dimensions)
Creates a random mpf_t* vector with the specified number of entries, which contains random values in ...
bool IsPlusInfinity(const mpf_t *value)
Checks whether the supplied value is the representation of +infinity.
void ReleaseValue(mpf_t *a)
Releases the reserved memory for the supplied mpf_t.
void IncreasePrecision()
Increases the precision instantly to a higher value.
mpf_t * SquaredEuclideanLength(const std::vector< mpf_t * > &vec)
Calculates the squared euclidean length of the supplied vector.
mpf_t * Sqrt(mpf_t *value)
Calculates the square root of the specified value.
int GetNumberOfMpftValuesInUse()
Getter function for the number of mpf_t values which are currently in use.
mpf_t * GetResultPointer()
Prepares an mpf_t value for using it.
base namespace for arbitrary precision calculation.
Definition: check_condition.h:45
mpf_t * GetRandomMpft()
Calculates a random mpf_t value in the range [0,1] with the specified standard random number generato...
bool IsInfinite(const mpf_t *value)
Checks whether the supplied value is the representation of +infinity or -infinity.
void ReleaseValues(const std::vector< mpf_t * > &a)
Release the reserved memory for the entries of the supplied vector.
mpf_t * Abs(const mpf_t *x)
Calculates the absolute value of the supplied value.
std::vector< mpf_t * > OrthogonalProjection(const std::vector< mpf_t * > &vec, const std::vector< mpf_t * > &projection_vector)
Calculates the orthogonal projection of the vector vec on the projection vector.
bool IsMinusInfinity(const mpf_t *value)
Checks whether the supplied value is the representation of -infinity.
mpf_t * ToMpft(unsigned int value)
Converts the supplied unsigned int value to its mpf_t representation.
mpf_t * Arctan(mpf_t *x)
Calculates the arctangent function of the supplied value.
mpf_t * Exp(mpf_t *a)
Calculates the exponential function of the input.
void StatisticalCalculationsEnd()
Signals the end of statistical calculations.
std::vector< mpf_t * > Randomize(const std::vector< mpf_t * > &a)
Randomizes the supplied vector. Each entry will be multiplied by a random mpf_t value in the interval...
mpf_t * GetMinusInfinity()
Calculates the representation of -infinity.
This class is an abstract class. It supplies the interface for random number generators.
Definition: random_number_generator.h:52
void Sort(std::vector< mpf_t * > *vec)
Sorts the elements of the supplied vector in increasing order.
mpf_t * Max(mpf_t *a, mpf_t *b)
Calculates the maximum of the two values.
std::vector< mpf_t * > Subtract(const std::vector< mpf_t * > &a, const std::vector< mpf_t * > &b)
Performs element wise subtraction of the two vectors.
std::vector< mpf_t * > GetConstantVector(int dimension, const double &value)
Creates a vector with the specified number of entries. Each entry represents the supplied value...
mpf_t * Arccos(mpf_t *x)
Calculates the arccosine function of the supplied value.
mpf_t * GetUndefined()
Calculates the representation of an undefined value.
mpf_t * Pow(mpf_t *value, mpf_t *exponent)
Calculates the value to the power of the specified exponent.
mpf_t * Arcsin(mpf_t *x)
Calculates the arcsine function of the supplied value.
mpf_t * LogE(mpf_t *value)
Calculates the base E logarithm of the specified value.
mpf_t * Sin(mpf_t *x)
Calculates the sine function of the supplied value.
void StoreMpft(mpf_t *value, std::ofstream *stream)
Writes the content of a mpf_t value to the given stream such that it can completely recovered...
std::vector< double > MpftToDouble(const std::vector< mpf_t * > &a)
Converts the values of a vector with mpf_t* entries to a vector with double entries.
void StatisticalCalculationsStart()
Signals the start of statistical calculations.