CPolynomial:Get CPolynomial:MaxOrder

CPolynomial:Init


The Init method sets the first n coefficients to the same target value.

Syntax

CPolynomial:Init( n, value )

Example

The following script fragment initializes through 4-th order (the first 5 indices) to 1.0:

 

P = CPolynomial:new()

-- create a CPolynomial

P:Init( 5, 1.75)

-- set first 5 values to 1.75

Printf("coef[3]= %lg", P:Get(3))

-- result: coef[3] = 1.75

Related Topics

CPolynomial, Set