Factor

com.phasmidsoftware.number.algebra.util.Factor
case class Factor(f: Int)

Case class to model the concept of factors.

Value parameters

f

a factor.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def isMultiple(x: Int): Boolean

Determine whether f is a factor of x.

Determine whether f is a factor of x.

Value parameters

x

a potential multiple of f.

Attributes

Returns

true if f is a factor of x.

def unapply(x: Int): Option[Int]

Unapply method for this Factor.

Unapply method for this Factor.

Value parameters

x

a candidate multiple of f.

Attributes

Returns

Some(quotient) if x is a multiple of f; otherwise, None.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product