Matrix

problemutils.classes.Matrix$
See theMatrix companion class
object Matrix

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Matrix.type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply[A](height: Int, width: Int)(f: Pos2D => A): Matrix[A]
def fill[A](height: Int, width: Int)(elem: => A): Matrix[A]

Produces a matrix of the given dimensions filled with the result of some computation.

Produces a matrix of the given dimensions filled with the result of some computation.

Attributes

def from[A](input: Seq[Seq[A]]): Matrix[A]
def identity(size: Int): Matrix[Int]

Creates an identity matrix of the given dimension.

Creates an identity matrix of the given dimension.

Attributes

def range(height: Int, width: Int, start: Int): Matrix[Int]

Produces a matrix of the given dimensions, with the given starting value at the top-left (defaulting to 0), and counting up by 1 for each column and row (going right-down).

Produces a matrix of the given dimensions, with the given starting value at the top-left (defaulting to 0), and counting up by 1 for each column and row (going right-down).

Attributes

def rotation(rad: Double): Matrix[Double]

Creates a 2x2 rotation matrix for the given angle.

Creates a 2x2 rotation matrix for the given angle.

Attributes

def rotation(rad: Double, dir: Axis): Matrix[Double]

Creates a 3x3 rotation matrix for the given angle and axis.

Creates a 3x3 rotation matrix for the given angle and axis.

Attributes