Checkers

functions

is-diagonal

@function is-diagonal($matrix) { ... }
View source

Description

Checks whether all entries from the main diagonal of $matrix are set while all other entries are equal to 0

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none

Returns

Bool

Requires

is-lower-triangular

@function is-lower-triangular($matrix, $flag: null) { ... }
View source

Description

Checks whether $matrix is lower triangular with $flag option

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$flag

advanced option, either null or strict or unit or atom

String, Null null

Returns

Bool

Requires

is-numeric

@function is-numeric($matrix) { ... }
View source

Description

Checks whether all entries from $matrix are numeric

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none

Returns

Bool

Requires

is-square

@function is-square($matrix) { ... }
View source

Description

Returns whether $matrix has as many rows as columns

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none

Returns

Bool

Requires

[private] _is-triangular

@function _is-triangular($matrix, $side: top, $flag: null) { ... }
View source

Description

Checks whether $matrix is $side triangular with $flag options

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$side

side either top or bottom

String top
$flag

advanced option, either null or strict or unit or atom

String, Null null

Returns

Bool

Requires

Used by

is-upper-triangular

@function is-upper-triangular($matrix, $flag: null) { ... }
View source

Description

Checks whether $matrix is upper triangular with $flag option

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$flag

advanced option, either null or strict or unit or atom

String, Null null

Returns

Bool

Requires

Getters

functions

get-column

@function get-column($matrix, $index) { ... }
View source

Description

Return column at $index from $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$index

index

Number none

Returns

List

Requires

get-entry

@function get-entry($matrix, $coords) { ... }
View source

Description

Returns entry at $matrix[$coords[1], $coords[2]]

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$coords

(x y) coordinates

none

Returns

Any

Requires

Used by

get-row

@function get-row($matrix, $index) { ... }
View source

Description

Return row at $index from $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$index

index

Number none

Returns

List

Requires

Helpers

functions

[private] _valid-coords

@function _valid-coords($coords, $matrix: null) { ... }
View source

Description

Checks whether $coords are valid coordinates

Parameters

parameter Name parameter Description parameter Type parameter Default value
$coords

coordinates

none
$matrix

matrix

Matrix null

Returns

Bool

Requires

Used by

Initialization

functions

matrix

@function matrix($x, $y: $x) { ... }
View source

Description

Initializing a matrix of $x by $y with 0s

Parameters

parameter Name parameter Description parameter Type parameter Default value
$x

number of rows

Number none
$y

number of columns

Number $x

Returns

Matrix

Requires

Used by

unit-matrix

@function unit-matrix($x, $y: $x) { ... }
View source

Description

Initializing a matrix of $x by $y with its diagonal filled with 1s

Parameters

parameter Name parameter Description parameter Type parameter Default value
$x

number of rows

none
$y

number of columns

$x

Returns

Matrix

Requires

Miscellaneous

functions

add-matrices

@function add-matrices($matrices...) { ... }
View source

Description

Add $matrices

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrices

matrices

Arglist none

Returns

Matrix

Requires

columns

@function columns($matrix) { ... }
View source

Description

Returns number of columns in $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none

Returns

Number

Used by

display

@function display($matrix) { ... }
View source

Description

Returns the visual representation of $matrix as a string

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix to display

Matrix none

Returns

String

Used by

rows

@function rows($matrix) { ... }
View source

Description

Returns number of rows in $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none

Returns

Number

Used by

transpose

@function transpose($matrix) { ... }
View source

Description

Translate $matrix on its diagonal axe

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none

Returns

Matrix

Requires

mixins

display

@mixin display($matrix, $pseudo: before) { ... }
View source

Description

Mixin displaying the matrix using body pseudo-elements

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix to display

Matrix none
$pseudo

pseudo element to use

String before

Requires

Setters

functions

add-column

@function add-column($matrix, $column: (), $index: null) { ... }
View source

Description

Add a new $column to $matrix at $index

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$column

column to add

List ()
$index

index to add column at

Number, Null null

Returns

Matrix

Requires

add-row

@function add-row($matrix, $row: (), $index: null) { ... }
View source

Description

Add a new $row to $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$row

row to add

List ()
$index

index to add row at

Number, Null null

Returns

Matrix

Requires

set-column

@function set-column($matrix, $index, $column: ()) { ... }
View source

Description

Set $column at $index in $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$index

index

Number none
$column

column

List ()

Returns

Matrix

Requires

set-entry

@function set-entry($matrix, $coords, $value) { ... }
View source

Description

Assign $value at $matrix[$coords[1], $coords[2]]

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix to update

Matrix none
$coords

(x y) coordinates

List none
$value

value to assign at $matrix[$x, $y]

Any none

Returns

Matrix

Requires

Used by

set-row

@function set-row($matrix, $index, $row: ()) { ... }
View source

Description

Set $row at $index in $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$index

index

Number none
$row

row

List ()

Returns

Matrix

Requires

Swap

functions

swap-columns

@function swap-columns($matrix, $c1, $c2) { ... }
View source

Description

Swaps columns $c1 and $c2 from $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$c1

index of column 1

Number none
$c2

index of column 2

Number none

Returns

Matrix

Requires

Used by

swap-entries

@function swap-entries($matrix, $e1, $e2) { ... }
View source

Description

Swaps entries $e1 and $e2 from $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$e1

(x y) coordinates of first entry

Number none
$e2

(x y) coordinates of second entry

Number none

Returns

Matrix

Requires

swap-rows

@function swap-rows($matrix, $r1, $r2) { ... }
View source

Description

Swaps rows $r1 and $r2 from $matrix

Parameters

parameter Name parameter Description parameter Type parameter Default value
$matrix

matrix

Matrix none
$r1

index of row 1

Number none
$r2

index of row 2

Number none

Returns

Matrix

Requires

Used by