Skip to content

func

fn Fn.new #

fn Fn.new(f Fn) Fn

Fn.new exposes this operation as part of the public API.

fn FnFdf.new #

fn FnFdf.new(fn_fdf FnFdf) FnFdf

FnFdf.new exposes this operation as part of the public API.

fn FnVec.new #

fn FnVec.new(f FnVec) FnVec

FnVec.new exposes this operation as part of the public API.

type ArbitraryFn #

type ArbitraryFn = fn (x f64, params []f64) f64

ArbitraryFn defines a public type used by this module.

type DfFn #

type DfFn = fn (x f64, params []f64) f64

DfFn defines a public type used by this module.

type FdfFn #

type FdfFn = fn (x f64, params []f64) (f64, f64)

FdfFn defines a public type used by this module.

type VectorValuedFn #

type VectorValuedFn = fn (x f64, y []f64, params []f64) f64

VectorValuedFn defines a public type used by this module.

struct Fn #

struct Fn {
pub:
	f ArbitraryFn @[required]
mut:
	params []f64
}

Definition of an arbitrary function with parameters

fn (Fn) eval #

fn (f Fn) eval(x f64) f64

eval exposes this operation as part of the public API.

fn (Fn) safe_eval #

fn (f Fn) safe_eval(x f64) !f64

safe_eval exposes this operation as part of the public API.

struct FnFdf #

struct FnFdf {
pub:
	f   ?ArbitraryFn
	df  ?DfFn
	fdf ?FdfFn
mut:
	params []f64
}

Definition of an arbitrary function returning two values, r1, r2

fn (FnFdf) eval_f #

fn (fdf FnFdf) eval_f(x f64) ?f64

eval_f exposes this operation as part of the public API.

fn (FnFdf) eval_df #

fn (fdf FnFdf) eval_df(x f64) ?f64

eval_df exposes this operation as part of the public API.

fn (FnFdf) eval_f_df #

fn (fdf FnFdf) eval_f_df(x f64) ?(f64, f64)

eval_f_df exposes this operation as part of the public API.

struct FnVec #

struct FnVec {
	f VectorValuedFn @[required]
mut:
	params []f64
}

Definition of an arbitrary vector-valued function with parameters

fn (FnVec) eval #

fn (f FnVec) eval(x f64, y []f64) f64

eval exposes this operation as part of the public API.