NewtonPolynomial

de.christofreichardt.scala.shamir.NewtonPolynomial
class NewtonPolynomial(val degree: Int, val basis: IndexedSeq[BigInt], val coefficients: IndexedSeq[BigInt], val prime: BigInt) extends Tracing

Defines a Newton Polynomial.

Value parameters

basis

the Newton basis polynomials

coefficients

The Newton coefficients

degree

the degree of the polynomial

prime

the prime modulus

Attributes

Constructor

Creates an instance of a Newton Polynomial suitable for calculations using finite field algebra.

Graph
Supertypes
trait Tracing
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def evaluateAt(x: BigInt): BigInt

Computes y = P(x).

Computes y = P(x).

Value parameters

x

the x value

Attributes

Returns

the y value

override def getCurrentTracer(): AbstractTracer

Returns the present tracer for this object.

Returns the present tracer for this object.

Attributes

Returns

the current tracer, by default the NullTracer

Definition Classes
def pairwiseDifferent(values: List[BigInt]): Boolean
override def toString: String

Returns a string representation of the NewtonPolynomial.

Returns a string representation of the NewtonPolynomial.

Attributes

Returns

the string representation of the NewtonPolynomial

Definition Classes
Any

Inherited methods

def withTracer[T](resultType: String, callee: AnyRef, method: String)(block: => T): T

Custom control structure for tracing of embraced code blocks.

Custom control structure for tracing of embraced code blocks.

Type parameters

T

the actual type of the embraced code block

Value parameters

block

the embraced code block

callee

the call site

method

denotes the method signature

resultType

denotes the return type

Attributes

Returns

returns whatever block returns

Inherited from:
Tracing

Concrete fields

val basis: IndexedSeq[BigInt]
val c: Seq[BigInt]

the residues of the coefficients mod prime

the residues of the coefficients mod prime

Attributes

val coefficients: IndexedSeq[BigInt]
val degree: Int
val n: Int

alias for degree

alias for degree

Attributes

val prime: BigInt
val xx: Seq[BigInt]

the residues of the basis mod prime

the residues of the basis mod prime

Attributes