ll

package module
v0.0.0-...-1160512 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: MIT Imports: 6 Imported by: 0

README

ll

lifelike

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func S

func S(s ...int) sli

func Sum

func Sum(a *tensor.Dense, it tensor.Iterator) float64

Types

type CV

type CV struct {
	X, Y int
	V    float64
}

type Rule

type Rule struct {
	B []int
	S []int
}

Rule represents the rule that the world runs in, in the B/S format.

type Topology

type Topology int
const (
	Plane Topology = iota
	CylinderH
	CylinderV
	Torus
)

type World

type World struct {
	Rule
	G *tensor.Dense
	A [][]float64
	// contains filtered or unexported fields
}

World represents the world in which the cells live and die in.

func New

func New(s tensor.Shape, r Rule, topology Topology, isOuterIso bool) (*World, error)

func (*World) Set

func (w *World) Set(cs ...CV)

func (*World) Step

func (w *World) Step() error

Directories

Path Synopsis
render
vis

Jump to

Keyboard shortcuts

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