INumericTSelf Interface

Defines a generalization for numeric value types.

Definition

Namespace: Jodosoft.Numerics
Assembly: Jodosoft.Numerics (in Jodosoft.Numerics.dll) Version: 2.0
public interface INumeric<TSelf> : IComparable, 
	IComparable<TSelf>, IEquatable<TSelf>, IFormattable, IProvider<IBinaryIO<TSelf>>, 
	IProvider<IConvert<TSelf>>, IProvider<IMath<TSelf>>, 
	IProvider<INumericBitConverter<TSelf>>, IProvider<INumericRandom<TSelf>>, 
	IProvider<INumericStatic<TSelf>>, IProvider<IVariantRandom<TSelf>>, 
	ISerializable
where TSelf : struct, new(), INumeric<TSelf>
Implements
IProviderIBinaryIOTSelf, IProviderIConvertTSelf, IProviderIMathTSelf, IProviderINumericBitConverterTSelf, IProviderINumericRandomTSelf, IProviderINumericStaticTSelf, IProviderIVariantRandomTSelf, IComparable, IComparableTSelf, IEquatableTSelf, IFormattable, ISerializable

Type Parameters

TSelf
The type that implements INumericTSelf.

Methods

Add Computes the sum of the current value and the specified value.
BitwiseComplement Produces a bitwise complement of the current value by reversing each bit.
CompareTo(T)Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Inherited from IComparableTSelf)
CompareTo(Object)Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Inherited from IComparable)
Divide Divides the current value by the specified value.
EqualsIndicates whether the current object is equal to another object of the same type.
(Inherited from IEquatableTSelf)
GetInstance Returns an instance of T.
(Inherited from IProviderT)
GetObjectDataPopulates a SerializationInfo with the data needed to serialize the target object.
(Inherited from ISerializable)
IsGreaterThan Determines whether the current value is greater than the specified value.
IsGreaterThanOrEqualTo Determines whether the current value is greater than or equal to the specified value.
IsLessThan Determines whether the current value is less than the specified value.
IsLessThanOrEqualTo Determines whether the current value is less than or equal to the specified value.
LeftShift

Shifts the current value left by the specified number of bits.

Discards the high-order bits that are outside the range of the result type and sets the low-order empty bit positions to zero.

LogicalAnd Computes the bitwise logical AND of the current value and the specified value.
LogicalExclusiveOr Computes the bitwise logical exclusive OR, also known as the bitwise logical XOR, of the current value and the specified value.
LogicalOr Computes the bitwise logical OR of the current value and the specified value.
Multiply Computes the product of the current value and the specified value.
Negative Computes the numeric negation of the current value.
Positive Returns the current value.
Remainder Computes the remainder after dividing the current value by the specified value.
RightShift

Shifts the current value right by the specified number of bits.

Performs an signed (arithmetic) shift if TSelf is signed; otherwise sets the high-order bits to zero. Discards the low-order bits.

Subtract Subtracts the specified value from the current value.
ToString(IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
ToString(String) Converts the numeric value of this instance to its equivalent string representation, using the specified format.
ToString(String, IFormatProvider)Formats the value of the current instance using the specified format.
(Inherited from IFormattable)

Operators

See Also