expreduce

package
v0.0.0-...-190864c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 37 Imported by: 7

Documentation

Overview

Code generated for package expreduce by go-bindata DO NOT EDIT. (@generated) sources: resources/arithmetic.m resources/atoms.m resources/boolean.m resources/calculus.m resources/combinatorics.m resources/comparison.m resources/equationdata.m resources/expression.m resources/flowcontrol.m resources/functional.m resources/init.m resources/list.m resources/manip.m resources/matrix.m resources/numbertheory.m resources/pattern.m resources/plot.m resources/power.m resources/random.m resources/replacement.m resources/rubi/1.1.1 Linear binomial products.m resources/rubi/1.1.3 General binomial products.m resources/rubi/1.1.4 Improper binomial products.m resources/rubi/1.2.1 Quadratic trinomial products.m resources/rubi/1.2.2 Quartic trinomial products.m resources/rubi/1.2.3 General trinomial products.m resources/rubi/1.2.4 Improper trinomial products.m resources/rubi/1.3 Miscellaneous algebraic functions.m resources/rubi/2 Exponentials.m resources/rubi/3 Logarithms.m resources/rubi/4.1 Sine.m resources/rubi/4.2 Tangent.m resources/rubi/4.3 Secant.m resources/rubi/4.4 Miscellaneous trig functions.m resources/rubi/5 Inverse trig functions.m resources/rubi/6 Hyperbolic functions.m resources/rubi/7 Inverse hyperbolic functions.m resources/rubi/8 Special functions.m resources/rubi/9.1 Integrand simplification rules.m resources/rubi/9.2 Derivative integration rules.m resources/rubi/9.3 Piecewise linear functions.m resources/rubi/9.4 Miscellaneous integration rules.m resources/rubi/Integration Utility Functions.m resources/rubi/MakeRubiMxFile.m resources/rubi/README resources/rubi/Rubi.m resources/rubi/Rubi4.12.nb resources/rubi/ShowStep Routines.m resources/rubi.m resources/rubi_loader.m resources/simplify.m resources/solve.m resources/sort.m resources/specialsyms.m resources/stats.m resources/string.m resources/system.m resources/tests.m resources/time.m resources/trig.m

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func EasyRun

EasyRun evaluates a string of Expreduce code and returns the result as a string.

func EvalInterpMany

func EvalInterpMany(
	doc string,
	fn string,
	es expreduceapi.EvalStateInterface,
) expreduceapi.Ex

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func ReadList

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type Definition

type Definition struct {
	// The symbol name, like "Mean", and "Total"
	Name  string
	Usage string
	// Currently used for SetDelayed, since other definitions depend on
	// SetDelayed, we define it first.
	Bootstrap         bool
	OmitDocumentation bool

	Details string

	SimpleExamples  []TestInstruction
	FurtherExamples []TestInstruction
	Tests           []TestInstruction
	KnownFailures   []TestInstruction
	KnownDangerous  []TestInstruction

	Attributes []string
	Default    string
	// contains filtered or unexported fields
}

The Definition struct provides metadata about a builtin function.

func (*Definition) AnnotateWithDynamic

func (def *Definition) AnnotateWithDynamic(es expreduceapi.EvalStateInterface)

AnnotateWithDynamic annotates a Definition with anything else that might have been defined dynamically, perhaps through the initialization of the builtin function through builtin Expreduce code. Helpful in generating documentation.

type EvalState

type EvalState struct {
	// Embedded type for logging
	logging.CASLogger

	NoInit bool
	// contains filtered or unexported fields
}

EvalState keeps track of the state of the Expreduce interpreter. It contains all definitions and any evaluation bits.

func NewEvalState

func NewEvalState() *EvalState

func (*EvalState) Clear

func (es *EvalState) Clear(name string)

func (*EvalState) ClearAll

func (es *EvalState) ClearAll()

func (*EvalState) Define

func (es *EvalState) Define(lhs expreduceapi.Ex, rhs expreduceapi.Ex)

func (*EvalState) Eval

func (es *EvalState) Eval(expr expreduceapi.Ex) expreduceapi.Ex

Eval evaluates an expression and returns the resulting expression.

func (*EvalState) GetDef

func (*EvalState) GetDefined

func (es *EvalState) GetDefined(name string) (expreduceapi.Def, bool)

func (*EvalState) GetDefinedMap

func (es *EvalState) GetDefinedMap() expreduceapi.DefinitionMap

func (*EvalState) GetDefinedSnapshot

func (es *EvalState) GetDefinedSnapshot() expreduceapi.DefinitionMap

func (*EvalState) GetListDef

func (es *EvalState) GetListDef(name string) expreduceapi.ExpressionInterface

func (*EvalState) GetLogger

func (es *EvalState) GetLogger() expreduceapi.LoggingInterface

func (*EvalState) GetReapSown

func (es *EvalState) GetReapSown() expreduceapi.ExpressionInterface

func (*EvalState) GetStreamManager

func (es *EvalState) GetStreamManager() expreduceapi.StreamManager

func (*EvalState) GetStringDef

func (es *EvalState) GetStringDef(name string, defaultVal string) string

func (*EvalState) GetStringFn

func (es *EvalState) GetStringFn(
	headStr string,
) (expreduceapi.ToStringFnType, bool)

func (*EvalState) GetSymDef

func (es *EvalState) GetSymDef(name string) (expreduceapi.Ex, bool)

func (*EvalState) GetTimeCounter

func (es *EvalState) GetTimeCounter() *timecounter.Group

func (*EvalState) GetTrace

func (*EvalState) HasThrown

func (es *EvalState) HasThrown() bool

func (*EvalState) Init

func (es *EvalState) Init(loadAllDefs bool)

func (*EvalState) IsDef

func (es *EvalState) IsDef(name string) bool

func (*EvalState) IsFrozen

func (es *EvalState) IsFrozen() bool

func (*EvalState) IsInterrupted

func (es *EvalState) IsInterrupted() bool

func (*EvalState) MarkSeen

func (es *EvalState) MarkSeen(name string)

func (*EvalState) ProcessTopLevelResult

func (es *EvalState) ProcessTopLevelResult(
	in expreduceapi.Ex,
	out expreduceapi.Ex,
) expreduceapi.Ex

func (*EvalState) SetDefined

func (es *EvalState) SetDefined(name string, def expreduceapi.Def)

func (*EvalState) SetFrozen

func (es *EvalState) SetFrozen(frozen bool)

func (*EvalState) SetReapSown

func (es *EvalState) SetReapSown(ex expreduceapi.ExpressionInterface)

func (*EvalState) SetTrace

func (es *EvalState) SetTrace(newTrace expreduceapi.ExpressionInterface)

func (*EvalState) Throw

func (*EvalState) Thrown

type ExampleOnlyInstruction

type ExampleOnlyInstruction struct {
	Out string
	In  string
}

type NamedDefSet

type NamedDefSet struct {
	Name string
	Defs []Definition
}

NamedDefSet provides a means of grouping Definitions under a category name. This is useful for generating documentation.

func GetAllDefinitions

func GetAllDefinitions() (defs []NamedDefSet)

GetAllDefinitions returns a list of all builtin functions with metadata. The function returns a list organized by category.

type ResetState

type ResetState struct{}

type SameTest

type SameTest struct {
	Out string
	In  string
}

type SameTestEx

type SameTestEx struct {
	Out expreduceapi.Ex
	In  expreduceapi.Ex
	// contains filtered or unexported fields
}

type StringTest

type StringTest struct {
	Out string
	In  string
}

type TestComment

type TestComment struct {
	Comment string
}

type TestInstruction

type TestInstruction interface {
	// contains filtered or unexported methods
}

Directories

Path Synopsis
Code generated for package rubi_snapshot by go-bindata DO NOT EDIT.
Code generated for package rubi_snapshot by go-bindata DO NOT EDIT.
Package streammanager keeps track of open streams and allows for reading/writing to them.
Package streammanager keeps track of open streams and allows for reading/writing to them.
Package timecounter provides functionality for aggregating times based on a string key.
Package timecounter provides functionality for aggregating times based on a string key.

Jump to

Keyboard shortcuts

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