C# 클래스 YAMP.ScalarValue

A scalar value, which is a complex double type.
상속: NumericValue
파일 보기 프로젝트 열기: FlorianRappl/YAMP 1 사용 예제들

공개 메소드들

메소드 설명
Abs ( ) : double

Computes the absolute value of the current scalar.

AbsSquare ( ) : double

Computes the absolute value squared of the current scalar.

Add ( Value left, Value right ) : ScalarValue

Scalar + Scalar

Arccos ( ) : ScalarValue

Computes the inverse cosine of the scalar (arccos).

Arccot ( ) : ScalarValue

Computes the inverse cotangent of the scalar (arccot).

Arccsc ( ) : ScalarValue

Computes the inverse cosecant of the scalar (arccsc).

Arcsec ( ) : ScalarValue

Computes the inverse secant of the scalar (arcsec).

Arcsin ( ) : ScalarValue

Computes the inverse sine of the scalar (arcsin).

Arctan ( ) : ScalarValue

Computes the inverse tangent of the scalar (arctan).

Arg ( ) : double

Computes Atan2(imaginary, real), i.e. the angle in the complex (gaussian) plane.

Clear ( ) : void

Resets the current value.

Clone ( ) : ScalarValue

Copies the current instance.

ComplexSquare ( ) : ScalarValue

Computes z^* x z = |z|^2, which is AbsSquare().

Conjugate ( ) : ScalarValue

Conjugates the current scalar value, i.e. switches the sign of the imaginary value.

Copy ( ) : Value

Copies the current instance.

Cos ( ) : ScalarValue

Takes the cosine of the scalar.

Cot ( ) : ScalarValue

Takes the co-tangent (cos / sin) of the scalar.

Deserialize ( byte content ) : Value

Transforms a binary representation into a new instance.

Divide ( Value left, Value right ) : ScalarValue

Scalar / Scalar

Equals ( object obj ) : bool

Is the given object equal to this.

Exp ( ) : ScalarValue

Takes the exponential of the scalar.

Factorial ( ) : ScalarValue

Computes the factorial of the scalar.

GetHashCode ( ) : int

Computes the hashcode of the value inside.

GetIntegerOrThrowException ( String argumentName, String functionName ) : int

Gets the integer value or throws an exception if either the imaginary part is not 0 or the real part is not integer.

GetLengthOfString ( ParseContext context ) : Int32

Gets the length of the output in the given parse context.

Ln ( ) : ScalarValue

Takes the natural logarithm of the scalar.

Log ( ) : ScalarValue

Takes the natural logarithm of the scalar.

Log ( double basis ) : ScalarValue

Takes the general logarithm of the scalar.

Log10 ( ) : ScalarValue

Takes the base-10 logarithm of the scalar.

Mod ( Value left, Value right ) : ScalarValue

Scalar % Scalar

Multiply ( Value left, Value right ) : ScalarValue

Scalar * Scalar

Pow ( ScalarValue exponent ) : ScalarValue

Raises the scalar to the specified power.

Pow ( Value basis, Value exponent ) : ScalarValue

Scalar ^ Scalar

ScalarValue ( ) : System

Creates a new empty scalar value.

ScalarValue ( ScalarValue value ) : System

Creates a new scalar value from the given one.

ScalarValue ( bool boolean ) : System

Creates a new scalar value from a boolean, i.e. 1.0 or 0.0.

ScalarValue ( double real ) : System

Creates a new scalar value which is real.

ScalarValue ( double real, double imag ) : System

Creates a new scalar value with the given complex parameters.

Serialize ( ) : byte[]

Transforms the instance into a binary representation.

Sign ( ) : ScalarValue

Gives the signum of the scalar.

Sin ( ) : ScalarValue

Takes the sine of the scalar.

Sqrt ( ) : ScalarValue

Takes the square root of the scalar.

Square ( ) : ScalarValue

Computes z x z = z^2.

Subtract ( Value left, Value right ) : ScalarValue

Scalar - Scalar

Tan ( ) : ScalarValue

Takes the tangent (sin / cos) of the scalar.

ToString ( ParseContext context ) : String

Uses the standard string representation.

ToString ( ParseContext context, Int32 exponent ) : String

Use this string representation if you have a global exponent like everything is already e5 or similar. In this case the values get multiplied with e-5 for the output.

operator ( ) : ScalarValue

a % b.

operator ( ) : bool

l != r.

보호된 메소드들

메소드 설명
RegisterOperators ( ) : void

Registers all operators that are associated with the scalar.

비공개 메소드들

메소드 설명
IsPrimeNumber ( int n ) : bool
IsProbablyPrime ( int n, int m, int s, int d, int w ) : bool
PowMod ( int b, int e, int m ) : int

메소드 상세

Abs() 공개 메소드

Computes the absolute value of the current scalar.
public Abs ( ) : double
리턴 double

AbsSquare() 공개 메소드

Computes the absolute value squared of the current scalar.
public AbsSquare ( ) : double
리턴 double

Add() 공개 정적인 메소드

Scalar + Scalar
public static Add ( Value left, Value right ) : ScalarValue
left Value Must be a scalar.
right Value Must be a scalar.
리턴 ScalarValue

Arccos() 공개 메소드

Computes the inverse cosine of the scalar (arccos).
public Arccos ( ) : ScalarValue
리턴 ScalarValue

Arccot() 공개 메소드

Computes the inverse cotangent of the scalar (arccot).
public Arccot ( ) : ScalarValue
리턴 ScalarValue

Arccsc() 공개 메소드

Computes the inverse cosecant of the scalar (arccsc).
public Arccsc ( ) : ScalarValue
리턴 ScalarValue

Arcsec() 공개 메소드

Computes the inverse secant of the scalar (arcsec).
public Arcsec ( ) : ScalarValue
리턴 ScalarValue

Arcsin() 공개 메소드

Computes the inverse sine of the scalar (arcsin).
public Arcsin ( ) : ScalarValue
리턴 ScalarValue

Arctan() 공개 메소드

Computes the inverse tangent of the scalar (arctan).
public Arctan ( ) : ScalarValue
리턴 ScalarValue

Arg() 공개 메소드

Computes Atan2(imaginary, real), i.e. the angle in the complex (gaussian) plane.
public Arg ( ) : double
리턴 double

Clear() 공개 메소드

Resets the current value.
public Clear ( ) : void
리턴 void

Clone() 공개 메소드

Copies the current instance.
public Clone ( ) : ScalarValue
리턴 ScalarValue

ComplexSquare() 공개 메소드

Computes z^* x z = |z|^2, which is AbsSquare().
public ComplexSquare ( ) : ScalarValue
리턴 ScalarValue

Conjugate() 공개 메소드

Conjugates the current scalar value, i.e. switches the sign of the imaginary value.
public Conjugate ( ) : ScalarValue
리턴 ScalarValue

Copy() 공개 메소드

Copies the current instance.
public Copy ( ) : Value
리턴 Value

Cos() 공개 메소드

Takes the cosine of the scalar.
public Cos ( ) : ScalarValue
리턴 ScalarValue

Cot() 공개 메소드

Takes the co-tangent (cos / sin) of the scalar.
public Cot ( ) : ScalarValue
리턴 ScalarValue

Deserialize() 공개 메소드

Transforms a binary representation into a new instance.
public Deserialize ( byte content ) : Value
content byte The binary data.
리턴 Value

Divide() 공개 정적인 메소드

Scalar / Scalar
public static Divide ( Value left, Value right ) : ScalarValue
left Value Must be a scalar.
right Value Must be a scalar.
리턴 ScalarValue

Equals() 공개 메소드

Is the given object equal to this.
public Equals ( object obj ) : bool
obj object The compare object.
리턴 bool

Exp() 공개 메소드

Takes the exponential of the scalar.
public Exp ( ) : ScalarValue
리턴 ScalarValue

Factorial() 공개 메소드

Computes the factorial of the scalar.
public Factorial ( ) : ScalarValue
리턴 ScalarValue

GetHashCode() 공개 메소드

Computes the hashcode of the value inside.
public GetHashCode ( ) : int
리턴 int

GetIntegerOrThrowException() 공개 메소드

Gets the integer value or throws an exception if either the imaginary part is not 0 or the real part is not integer.
public GetIntegerOrThrowException ( String argumentName, String functionName ) : int
argumentName String The name of the variable that is requested.
functionName String The name of the function where this is requested.
리턴 int

GetLengthOfString() 공개 메소드

Gets the length of the output in the given parse context.
public GetLengthOfString ( ParseContext context ) : Int32
context ParseContext The query context to consider.
리턴 System.Int32

Ln() 공개 메소드

Takes the natural logarithm of the scalar.
public Ln ( ) : ScalarValue
리턴 ScalarValue

Log() 공개 메소드

Takes the natural logarithm of the scalar.
public Log ( ) : ScalarValue
리턴 ScalarValue

Log() 공개 메소드

Takes the general logarithm of the scalar.
public Log ( double basis ) : ScalarValue
basis double The basis to use for the logarithm.
리턴 ScalarValue

Log10() 공개 메소드

Takes the base-10 logarithm of the scalar.
public Log10 ( ) : ScalarValue
리턴 ScalarValue

Mod() 공개 정적인 메소드

Scalar % Scalar
public static Mod ( Value left, Value right ) : ScalarValue
left Value Must be a scalar.
right Value Must be a scalar.
리턴 ScalarValue

Multiply() 공개 정적인 메소드

Scalar * Scalar
public static Multiply ( Value left, Value right ) : ScalarValue
left Value Must be a scalar.
right Value Must be a scalar.
리턴 ScalarValue

Pow() 공개 메소드

Raises the scalar to the specified power.
public Pow ( ScalarValue exponent ) : ScalarValue
exponent ScalarValue The exponent for raising the scalar.
리턴 ScalarValue

Pow() 공개 정적인 메소드

Scalar ^ Scalar
public static Pow ( Value basis, Value exponent ) : ScalarValue
basis Value Must be a scalar.
exponent Value Must be a scalar.
리턴 ScalarValue

RegisterOperators() 보호된 메소드

Registers all operators that are associated with the scalar.
protected RegisterOperators ( ) : void
리턴 void

ScalarValue() 공개 메소드

Creates a new empty scalar value.
public ScalarValue ( ) : System
리턴 System

ScalarValue() 공개 메소드

Creates a new scalar value from the given one.
public ScalarValue ( ScalarValue value ) : System
value ScalarValue Copies the contents of the given value.
리턴 System

ScalarValue() 공개 메소드

Creates a new scalar value from a boolean, i.e. 1.0 or 0.0.
public ScalarValue ( bool boolean ) : System
boolean bool True for 1.0, False for 0.0.
리턴 System

ScalarValue() 공개 메소드

Creates a new scalar value which is real.
public ScalarValue ( double real ) : System
real double The real value.
리턴 System

ScalarValue() 공개 메소드

Creates a new scalar value with the given complex parameters.
public ScalarValue ( double real, double imag ) : System
real double The real part of the complex scalar.
imag double The imaginary part of the complex scalar.
리턴 System

Serialize() 공개 메소드

Transforms the instance into a binary representation.
public Serialize ( ) : byte[]
리턴 byte[]

Sign() 공개 메소드

Gives the signum of the scalar.
public Sign ( ) : ScalarValue
리턴 ScalarValue

Sin() 공개 메소드

Takes the sine of the scalar.
public Sin ( ) : ScalarValue
리턴 ScalarValue

Sqrt() 공개 메소드

Takes the square root of the scalar.
public Sqrt ( ) : ScalarValue
리턴 ScalarValue

Square() 공개 메소드

Computes z x z = z^2.
public Square ( ) : ScalarValue
리턴 ScalarValue

Subtract() 공개 정적인 메소드

Scalar - Scalar
public static Subtract ( Value left, Value right ) : ScalarValue
left Value Must be a scalar.
right Value Must be a scalar.
리턴 ScalarValue

Tan() 공개 메소드

Takes the tangent (sin / cos) of the scalar.
public Tan ( ) : ScalarValue
리턴 ScalarValue

ToString() 공개 메소드

Uses the standard string representation.
public ToString ( ParseContext context ) : String
context ParseContext The context to use.
리턴 String

ToString() 공개 메소드

Use this string representation if you have a global exponent like everything is already e5 or similar. In this case the values get multiplied with e-5 for the output.
public ToString ( ParseContext context, Int32 exponent ) : String
context ParseContext The parse context to use.
exponent System.Int32 The global exponent that is in use.
리턴 String

operator() 공개 정적인 메소드

a % b.
public static operator ( ) : ScalarValue
리턴 ScalarValue

operator() 공개 정적인 메소드

l != r.
public static operator ( ) : bool
리턴 bool