Click or drag to resize
Accord.NET (logo)

Rational Methods

The Rational type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAbs
Returns the absolute value of a Rational.
Public methodCompareTo(Object)
Compares this instance to another Rational and returns an indication of their relative values.
Public methodCompareTo(Rational)
Compares this instance to another Rational and returns an indication of their relative values.
Public methodStatic memberDivRem
Calculates the quotient of two rational numbers and also returns the remainder in an output parameter.
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Rational)
Indicates whether this instance and a specified Rational are equal.
Public methodStatic memberFromDecimal
Converts a floating-point number to a rational number.
Public methodStatic memberFromDouble
Converts a floating-point number to a rational number.
Public methodStatic memberFromDoubleWithMaxDenominator
Converts a floating-point decimal to a rational number.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInverse
Gets the inverse of the current Rational value (that is, one divided by the current value).
Public methodStatic memberIsIndeterminate
Returns a value that indicates whether the specified Rational represents an indeterminate value.
Public methodStatic memberIsInfinity
Returns a value that indicates whether the specified Rational evaluates to positive or negative infinity.
Public methodStatic memberIsNegativeInfinity
Returns a value that indicates whether the specified Rational evaluates to negative infinity.
Public methodStatic memberIsPositiveInfinity
Returns a value that indicates whether the specified Rational evaluates to positive infinity.
Public methodStatic memberIsZero
Returns a value that indicates whether the specified Rational evaluates to zero.
Public methodStatic memberMax
Returns the larger of two Rationals.
Public methodStatic memberMin
Returns the smaller of two Rationals.
Public methodNegate
Gets the negated version of the current Rational value (that is, the current value multiplied by negative one).
Public methodStatic memberParse(String)
Converts the string representation of a number to its Rational representation.
Public methodStatic memberParse(String, NumberStyles)
Converts the string representation of a number to its Rational representation.
Public methodStatic memberParse(String, IFormatProvider)
Converts the string representation of a number to its Rational representation.
Public methodStatic memberParse(String, NumberStyles, IFormatProvider)
Converts the string representation of a number to its Rational representation.
Public methodStatic memberPow
Returns a specified number raised to a specified power.
Public methodStatic memberRound
Rounds a Rational to the nearest integral value.
Public methodSimplify
Gets the simplified version of the rational number.
Public methodStatic memberSimplify(Int32, Int32)
Gets the simplified version of the rational number.
Public methodStatic memberSimplify(Int64, Int64)
Gets the simplified version of the rational number.
Public methodStrictlyEquals
Indicates whether this instance and a specified Rational are strictly equal; that is, the two instances must have equal numerators and denominators.
Public methodToDouble
Converts the current Rational to a double.
Public methodToMixedString
Converts the Rational to a string in the form of a mixed fraction.
Public methodToMixedString(String)
Converts the Rational to a string in the form of a mixed fraction.
Public methodToString
Converts the Rational to a string in the form of an improper fraction.
(Overrides ValueTypeToString.)
Public methodToString(IFormatProvider)
Converts this instance to its equivalent string representation.
Public methodToString(String, IFormatProvider)
Converts this instance to its equivalent string representation.
Public methodStatic memberTryParse(String, Rational)
Converts the string representation of a number to its Rational representation. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberTryParse(String, NumberStyles, Rational)
Converts the string representation of a number to its Rational representation. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberTryParse(String, IFormatProvider, Rational)
Converts the string representation of a number to its Rational representation. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberTryParse(String, NumberStyles, IFormatProvider, Rational)
Converts the string representation of a number to its Rational representation. A return value indicates whether the conversion succeeded or failed.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
See Also