Matrix

object Matrix
Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any
Matrix.type

Type members

Classlikes

enum Axis

Typesafe helper enum for the rotation functions in the problemutils.classes.Matrix object.

Typesafe helper enum for the rotation functions in the problemutils.classes.Matrix object.

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

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.

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.

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).

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

Creates a 2x2 rotation matrix for the given angle.

Creates a 2x2 rotation matrix for the given angle.

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.