HPolynomialDegree

Degree of the polynomial used for interpolation. A higher degree gives a higher quality result, while taking longer to compute.

Septic polynomial, fitted using 8 sample points.

Quintic polynomial, fitted using 6 sample points.

Cubic polynomial, fitted using 4 sample points.

Linear polynomial, fitted using 2 sample points.

Nearest, uses the nearest sample point without any fitting.

Methods

print

print() source

Prints the HPolynomialDegree.

Differently from R’s behaviour, print doesn’t return the value invisibly.

Examples

library(harmonium)
pol_deg = HPolynomialDegree$Complex64
pol_deg$print()

# or similarly:
print(pol_deg)

eq

eq(other: HPolynomialDegree) -> bool source

Equality with another HPolynomialDegree.

Arguments

  • other

An HPolynomialDegree.

Returns

A bool.

Examples

library(harmonium)
pol_deg1 = HPolynomialDegree$quintic
pol_deg2 = HPolynomialDegree$quintic
pol_deg1$eq(pol_deg2) # TRUE

# or similarly:
pol_deg1 == pol_deg2

ne

ne(other: HPolynomialDegree) -> bool source

Difference with another HPolynomialDegree.

Arguments

  • other

An HPolynomialDegree.

Returns

A bool.

Examples

library(harmonium)
pol_deg1 = HPolynomialDegree$quintic
pol_deg2 = HPolynomialDegree$nearest
pol_deg1$ne(pol_deg2) # TRUE

# or similarly:
pol_deg1 != pol_deg2