Field

org.appliedtopology.tda4j.Field
See theField companion object
trait Field

Attributes

Companion
object
Experimental
true
Source
Field.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type Self

Attributes

Source
Field.scala

Value members

Abstract methods

def divide(x: Self, y: Self): Self

Attributes

Source
Field.scala
def invert(x: Self): Self

Attributes

Source
Field.scala
def isEqual(x: Self, y: Self): Boolean

Attributes

Source
Field.scala
def minus(x: Self, y: Self): Self

Attributes

Source
Field.scala
def negate(x: Self): Self

Attributes

Source
Field.scala
def one: Self

Attributes

Source
Field.scala
def plus(x: Self, y: Self): Self

Attributes

Source
Field.scala
def showForSelf: Show[Self]

Attributes

Source
Field.scala
def times(x: Self, y: Self): Self

Attributes

Source
Field.scala
def zero: Self

Attributes

Source
Field.scala

Concrete methods

def hash(x: Self): Int

A hash code of x that agrees with isEqual: elements the field calls equal have the same hash, whatever their representation, so that Chain can hash consistently with its equality. Nothing is required of unequal elements, so the default, 0 for every element, is right for any field; override it where equality is exact and the elements can be told apart (Z/p hashes the residue in 0 until p). A field that compares within a tolerance, like Field.DoubleApproximated, hashes every element alike: tolerance is not transitive, and no hash of the value can agree with it.

A hash code of x that agrees with isEqual: elements the field calls equal have the same hash, whatever their representation, so that Chain can hash consistently with its equality. Nothing is required of unequal elements, so the default, 0 for every element, is right for any field; override it where equality is exact and the elements can be told apart (Z/p hashes the residue in 0 until p). A field that compares within a tolerance, like Field.DoubleApproximated, hashes every element alike: tolerance is not transitive, and no hash of the value can agree with it.

Attributes

Source
Field.scala
def toDouble(x: Self): Double

x as a real number, for plots and printouts: the integer k (|k| <= 64, the smallest first) with k * 1 == x in the field, which is the balanced representative for Z/p; NaN when there is none. A field of real numbers overrides it with the value itself (Field.DoubleApproximated does). It is decided by the field, never by the runtime class of x: on Scala.js every boxed number is a Double, and an Fp would be taken for one.

x as a real number, for plots and printouts: the integer k (|k| <= 64, the smallest first) with k * 1 == x in the field, which is the balanced representative for Z/p; NaN when there is none. A field of real numbers overrides it with the value itself (Field.DoubleApproximated does). It is decided by the field, never by the runtime class of x: on Scala.js every boxed number is a Double, and an Fp would be taken for one.

Attributes

Source
Field.scala

Extensions

Extensions

extension (x: Self)
infix def *(y: Self): Self

Attributes

Source
Field.scala
infix def +(y: Self): Self

Attributes

Source
Field.scala
infix def -(y: Self): Self

Attributes

Source
Field.scala
infix def /(y: Self): Self

Attributes

Source
Field.scala
infix def eql(y: Self): Boolean

Attributes

Source
Field.scala
def isZero: Boolean

Attributes

Source
Field.scala
def unary_-: Self

Attributes

Source
Field.scala