arguments

package
v0.0.0-...-0a688d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2017 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Const

type Const interface {
	// Type will return the type of the constant
	Type() Type

	// Matrix will return a matrix if the type is matrix, else will panic
	Matrix() m.Matrix

	// Vector will return a vector if the type is vector, else will panic
	Vector() v.Vector

	// Value will return a value if the type is value, else will panic
	Value() gcv.Value
}

Const is the GoCalculate constant type

func MakeConst

func MakeConst(c interface{}) Const

MakeConst will take an interface of type Value, Vector or Matrix And will return a constant type. if the type is not a supported Type, the zero Value will be returned.

type Type

type Type int

Type is the type of the constant

const (
	// Value is for gcv.Value and is used for constant constants, i.e 5
	Value Type = iota
	// Vector is for v.Vector
	Vector
	// Matrix is for m.Matrix
	Matrix
	// Constant is for Const
	Constant
	// Variable is for Vars
	Variable
	// Operation is for operations
	Operation
)

type Var

type Var interface {
	// Eval will take a variable and return a constant.
	// the variable type, either type value, vector, matrix or const
	// must match the passed in variable type, else Eval will panic
	Eval(x interface{}) (Const, error)

	// MustEval is the same as Eval but will panic
	MustEval(x interface{}) Const
}

Var is the GoCalculate variable type

func NewVar

func NewVar(varType Type) Var

NewVar will make a new Variable of type varType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL