inheritance tree
Fenv
class definition
Defines a data structure for envelopes based on the notion of numeric functions (a function envelope or "fenv").
class Fenv (Inheritance-free)
feat !FenvType
attr env
- getEnv($)
Returns the unary numeric function of self.
- init(env:Env max:Mx min:Mn rangeIsForArgumentFun:RangeIsForArgumentFun)
Builds a env from a given numeric function. Env is a unary numeric function which expects and returns a float. If RangeIsForArgumentFun is true, then the interval [0,1] of the resulting fenv is mapped to [min, max] of the argument function. Otherwise, the interval [min,max] of the resulting fenv is mapped to [0,1] of the argument function.
NB: init blocks as long as Env is undetermined (Env is only an optional argument because the Score.scoreObject method getInitClassesVS requires this for score archiving).
- plot(n:N ...)
Plots the fenv by calling gnuplot in the background. N (an integer) is the number of fenv samples (see method toList). See the documentation of the procedure Gnuplot.plot for further arguments supported (the Gnuplot.plot args x and z are not supported).
- toList($ N)
Samples the fenv from 0.0 to 1.0 (including) and collects samples in a list. N is the number of samples (an integer). If N=1, only the last env value is returned. Returns a list of floats.
- toList_Int($ N add:Add mul:Mul)
Same as toList, but rounds the results to integers. The output can be scaled (before the rounding) with the summand Add and factor Mul (both floats).
- toPairs($ N)
Samples the fenv from 0.0 to 1.0 (including) and collects the x-y-pairs as sublists in a list: [[X1 Y1] ... [Xn Yn]]. N is the number of samples (an integer). If N=1, only the last env value is returned.
- y($ X)
Access the y value (a float) of fenv at X (a float).
end