HPolynomialDegree
Degree of the polynomial used for interpolation. A higher degree gives a higher quality result, while taking longer to compute.
Septic
Septic polynomial, fitted using 8 sample points.
Quintic
.
Quintic polynomial, fitted using 6 sample points.
Cubic
.
Cubic polynomial, fitted using 4 sample points.
Linear
.
Linear polynomial, fitted using 2 sample points.
Nearest
.
Nearest, uses the nearest sample point without any fitting.
Methods
print()
source
Prints the HPolynomialDegree
.
Differently from R’s behaviour, print
doesn’t return the value invisibly.
Examples
library(harmonium)
= HPolynomialDegree$Complex64
pol_deg $print()
pol_deg
# 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)
= HPolynomialDegree$quintic
pol_deg1 = HPolynomialDegree$quintic
pol_deg2 $eq(pol_deg2) # TRUE
pol_deg1
# or similarly:
== pol_deg2 pol_deg1
ne
ne(other: HPolynomialDegree) -> bool
source
Difference with another HPolynomialDegree
.
Arguments
other
An HPolynomialDegree
.
Returns
A bool
.
Examples
library(harmonium)
= HPolynomialDegree$quintic
pol_deg1 = HPolynomialDegree$nearest
pol_deg2 $ne(pol_deg2) # TRUE
pol_deg1
# or similarly:
!= pol_deg2 pol_deg1