Factor

case class Factor(p: SafeLong, var next: SafeLong) extends Ordered[Factor]

Represents a prime factor which we need to keep track of.

The first field 'p' is the prime itself. The 'next' field is the next multiple of the prime that we expect to see.

We use a slightly non-standard compare() function so that the factor with the smallest 'next' field will be the largest.

trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def compare(that: Factor): Int

Inherited methods

def <(that: Factor): Boolean
Inherited from:
Ordered
def <=(that: Factor): Boolean
Inherited from:
Ordered
def >(that: Factor): Boolean
Inherited from:
Ordered
def >=(that: Factor): Boolean
Inherited from:
Ordered
def compareTo(that: Factor): Int
Inherited from:
Ordered
Inherited from:
Product