mdd

package
v0.0.0-...-c730170 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(aa, bb rbtree.Item) int

Types

type IntervalMddStore

type IntervalMddStore struct {
	NextId   int
	Nodes    []*IntervalNode
	MaxNodes int
	Top      int
	// contains filtered or unexported fields
}

func InitIntervalMdd

func InitIntervalMdd(size int) (b IntervalMddStore)

func (*IntervalMddStore) ClauseIds

func (b *IntervalMddStore) ClauseIds(n IntervalNode) (v int, level int, des []int)

preparation for MDDs, gives out ids of descendants

func (*IntervalMddStore) Debug

func (store *IntervalMddStore) Debug(withTable bool)

func (*IntervalMddStore) GetByWeight

func (mddStore *IntervalMddStore) GetByWeight(level int, weight int64) (id int, wmin, wmax int64)

returns node, if exists

func (*IntervalMddStore) Insert

func (mddStore *IntervalMddStore) Insert(n IntervalNode) (id int)

func (*IntervalMddStore) RemoveRedundants

func (store *IntervalMddStore) RemoveRedundants() (removed int)

cleans the mdd from redundant nodes

type IntervalNode

type IntervalNode struct {
	Id       int
	Level    int
	Wmin     int64
	Wmax     int64
	Children []int
}

func (IntervalNode) IsOne

func (node IntervalNode) IsOne() bool

func (IntervalNode) IsZero

func (node IntervalNode) IsZero() bool

type MddStore

type MddStore struct {
	NextId int
	Nodes  []*Node
	//	Levels   [][]*Node
	MaxNodes int
	Top      int
	// contains filtered or unexported fields
}

func Init

func Init() (b MddStore)

func (*MddStore) NewNode

func (mdd *MddStore) NewNode(l int, children []int) int

func (*MddStore) PrintDOT

func (mdd *MddStore) PrintDOT()

type Node

type Node struct {
	Id       int
	Level    int
	Children []int
	Parents  []int
}

func (Node) IsOne

func (node Node) IsOne() bool

func (Node) IsZero

func (node Node) IsZero() bool

func (Node) Print

func (node Node) Print()

Jump to

Keyboard shortcuts

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