CPolynomial:new

CPolynomial Class


The CPolynomial class manages a list of coefficient values. This class is used by some methods such as CImage:ScalePolyVal which require a coefficient set as input. The most typically used methods are Set and Get to add and retrieve coefficients, respectively.

NOTE: The coefficients are indexed relative to 0, i.e., coef[0] is the lowest (zero order, or constant) term.

Usage

Construction

Object = CPolynomial:new()

Destruction

Object:delete()

Properties

This class has no exposed properties.

Construction

new

Creates a new instance of the CPolynomial class.

delete

Deletes the instance of the CPolynomial object.

Copy

Copies the CPolynomial to a new CPolynomial object.

Operations

Count

Returns the number of coefficients in the list.

Empty

Empties all coefficients from the set.

Exists

Returns true if a coefficient at index has been initialized.

Get

Returns the coefficient value at an index.

Init

Initializes some number of coefficients to a value.

MaxOrder

Returns the maximum order coefficient that is initialized.

Remove

Removes the coefficient value at an index.

Set

Sets the coefficient value at an index.

Related Topics

Script Classes, CArray