matrix

package
v0.0.0-...-bd4d0b6 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidIndex = -1
	InvalidValue = -1.0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Matrix

type Matrix struct {
	IndexMap        map[string]int
	ReverseIndexMap map[int]string
	Data            *mat.Dense
}

Matrix

Standard relationship representation layer based on matrix

func CreateMatrixFromGraph

func CreateMatrixFromGraph[T string, U any](g graph.Graph[T, U]) (*Matrix, error)

func (*Matrix) ById

func (m *Matrix) ById(id int) string

func (*Matrix) ForEach

func (m *Matrix) ForEach(s string, f func(i int, v float64))

func (*Matrix) Id

func (m *Matrix) Id(s string) int

func (*Matrix) Size

func (m *Matrix) Size() int

Jump to

Keyboard shortcuts

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