Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Value ¶
type Value interface {
// returns the real part of a value
Real() float64
// returns the imaginary part of a value
Imag() float64
// returns the compelx representation of a value
Complex() complex128
// returns the type of raw value
Type() Type
// returns true if the Value is equal to zero
IsZero() bool
// String will return the string representation of the value
String() string
}
Value is the main return type for the GoCalculate Framework Values are immutable once created
func RetrieveValues ¶
RetrieveValues returns a copy of the []Value of vals Values
type Values ¶
type Values interface {
// Returns the index of val. If val is not in Values it returns -1.
IndexOf(val Value) int
// Set the Value val at index
Set(index int, val Value)
// Append Value val to Values
Append(val Value)
// Returns the Value at index
Get(index int) Value
// Returns a subset of Values from start to finish
Subset(start, finish int) Values
// Returns a copy of Values.
Copy() Values
// Return Length of Values
Len() int
// Returns the Core Type of the Values. i.e the highest ranking Type
Type() Type
// contains filtered or unexported methods
}
Values works as GoCalculate's main list of values
func MakeValues ¶
func MakeValues(vals ...interface{}) Values
MakeValues returns a Values type, takes in a slice of interfaces. in an interface is not a supported type, that interface will be forced to the zero Value
func MakeValuesAlt ¶
MakeValuesAlt returns a Values type, but requires a framework []Value slice
Click to show internal directories.
Click to hide internal directories.