matrix

package
v0.0.0-...-79eae96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FibN

func FibN(n int) int

fibN returns n-th number of Fibonacci Series

func FibNBig

func FibNBig(n int) *big.Int

fibNBig returns n-th number of fibonacci series

Types

type Matrix

type Matrix [2][2]int

func MatrixIdentity

func MatrixIdentity() Matrix

func (Matrix) FastPower

func (a Matrix) FastPower(n int) Matrix

func (Matrix) Mul

func (a Matrix) Mul(b Matrix) (c Matrix)

func (Matrix) Power

func (a Matrix) Power(n int) Matrix

Power returns a^n

type MatrixBig

type MatrixBig struct {
	// contains filtered or unexported fields
}

func NewMatrixBig

func NewMatrixBig() *MatrixBig

func (*MatrixBig) FastPower

func (b *MatrixBig) FastPower(a *MatrixBig, n int) *MatrixBig

func (*MatrixBig) Init

func (p *MatrixBig) Init(v00, v10, v01, v11 int64) *MatrixBig

func (*MatrixBig) InitIdendity

func (p *MatrixBig) InitIdendity() *MatrixBig

func (*MatrixBig) Mul

func (c *MatrixBig) Mul(a, b *MatrixBig) *MatrixBig

c = a * b

func (*MatrixBig) Power

func (b *MatrixBig) Power(a *MatrixBig, n int) *MatrixBig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL