Vocabulary

math.matrices.extras

Inputs

Outputs

Word description

Compute the nth power of the input matrix. If n is -1, the inverse of the matrix is calculated (but see multiplicative-inverse for pitfalls).

Errors

negative-power-matrix if n is a negative number other than -1.

undefined-inverse if n is -1 and the multiplicative-inverse of m is undefined.

Notes

Examples

Definition

math.matrices.extras

Inputs

m | a matrix |

n | an object |

Outputs

n | an object |

Word description

Compute the nth power of the input matrix. If n is -1, the inverse of the matrix is calculated (but see multiplicative-inverse for pitfalls).

Errors

negative-power-matrix if n is a negative number other than -1.

undefined-inverse if n is -1 and the multiplicative-inverse of m is undefined.

Notes

• | This word is the swapped variant of n^m. |

• | This word is intended for use with "flat" (2-dimensional) matrices. |

• | This word assumes that elements of the input matrix are compatible with the following words: max ( obj1 obj2 -- obj ) abs ( x -- y ) / ( x y -- z ) |

Examples

USING: math.matrices.extras prettyprint ;
{ { 1 2 } { 3 4 } } 2 m^n .

{ { 7 10 } { 15 22 } }

{ { 7 10 } { 15 22 } }

Definition

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.99 x86.64 (2173, heads/master-f3ee5c5979, Sep 18 2022 13:17:51)