Polynomial

de.christofreichardt.scala.shamir.Polynomial
class Polynomial(val coefficients: IndexedSeq[BigInt], val prime: BigInt) extends Tracing

Defines a polynomial in its canonical form.

Value parameters

coefficients

the polynoms coefficients

prime

the prime modulus

Attributes

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
override def toString: String

Returns a string representation of the Polynomial.

Returns a string representation of the Polynomial.

Attributes

Returns

the string representation of the Polynomial

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 a: Seq[BigInt]

the remaining coefficients while dropping leading zeros

the remaining coefficients while dropping leading zeros

Attributes

val coefficients: IndexedSeq[BigInt]
val degree: Int

the degree of the polynomial

the degree of the polynomial

Attributes

val isZero: Boolean

indicates the zero polynomial

indicates the zero polynomial

Attributes

val prime: BigInt