Namespaces

Types

Type Rational

Namespace MathNet.Numerics

Interfaces IComparable, ICloneable

Methods

Properties

Public instance methods

Rational Add(Rational rational)

Create a new rational as the result of adding a rational to this rational.
Parameters
return Rational
Rational rational The rational to add

void AddInplace(Polynomial polynomial)

Add a polynomial directly inplace to this rational.
Parameters
Polynomial polynomial The polynomial to add.

void AddInplace(double n)

Add a floating point number directly inplace to this rational.
Parameters
double n The floating point number to add.

Rational Clone()

Create a copy of this rational.
Parameters
return Rational

int CompareTo(Rational rational)

Compare this rational to another rational.
Parameters
return int
Rational rational

Rational Divide(Rational rational)

Create a new rational as the result of dividing a rational from this rational.
Parameters
return Rational
Rational rational The rational to divide with.

Rational Divide(Polynomial polynomial)

Create a new rational as the result of dividing a polynomial from this rational.
Parameters
return Rational
Polynomial polynomial The polynomial to divide with.

void DivideInplace(double n)

Divide a floating point number directly inplace from this rational.
Parameters
double n The floating point number to divide with.

bool Equals(Rational rational)

Check whether this rational is equal to another rational.
Parameters
return bool
Rational rational

bool Equals(object obj)

Check whether this rational is equal to another rational.
Parameters
return bool
object obj

double Evaluate(double value)

Evaluate the value of this rational at a given point.
Parameters
return double
double value The point where to evaluate the rational

int GetHashCode()

Serves as a hash function for rationals.
Parameters
return int

Type GetType()

Parameters
return Type

void InvertInplace()

Invert this rational directly inplace.

Rational Multiply(Polynomial polynomial)

Create a new rational as the result of multiplying a polynomial to this rational.
Parameters
return Rational
Polynomial polynomial The polynomial to multiply with.

Rational Multiply(Rational rational)

Create a new rational as the result of multiplying a rational to this rational.
Parameters
return Rational
Rational rational The rational to multiply with.

void MultiplyInplace(double n)

Multiply a floating point number directly inplace to this rational.
Parameters
double n The floating point number to multiply with.

void NegateInplace()

Negate this rational directly inplace.

void Normalize()

Normalize both numerator and denominator polynomials.

Rational Subtract(Rational rational)

Create a new rational as the result of subtracting a rational from this rational.
Parameters
return Rational
Rational rational The rational to subtract.

void SubtractInplace(Polynomial polynomial)

Subtract a polynomial directly inplace from this rational.
Parameters
Polynomial polynomial The polynomial to subtract.

void SubtractInplace(double n)

Subtract a floating point number directly inplace from this rational.
Parameters
double n The floating point number to subtract.

string ToString()

Format a human-readable string of this rational with "x" as base variable.
Parameters
return string

string ToString(string baseVariable)

Format a human-readable string of this rational with the given string as base variable (e.g. "x").
Parameters
return string
string baseVariable

Public static methods

bool Equals(Rational rational1, Rational rational2)

Check whether two rationals are equal.
Parameters
return bool
Rational rational1
Rational rational2

Public properties

Polynomial Denominator get; set;

The denominator polynomial.
return Polynomial

int DenominatorOrder get;

The order of the denominator polynomial.
return int

Polynomial Numerator get; set;

The numerator polynomial.
return Polynomial

int NumeratorOrder get;

The order of the numerator polynomial.
return int