nodeset

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: GPL-3.0 Imports: 10 Imported by: 1

README

nodeset

merge and expand node string clone from https://github.com/ubccr/grendel/nodeset

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidNodeSet = errors.New("invalid nodeset")
	ErrParseNodeSet   = errors.New("nodeset parse error")
)
View Source
var (
	ErrInvalidRangeSet      = errors.New("invalid range set")
	ErrMismatchedDimensions = errors.New("mismatched dimensions")
	ErrParseRangeSet        = errors.New("rangeset parse error")
	ErrInvalidPadding       = errors.New("invalid padding")
)

Functions

func Expand

func Expand(nodestr string) ([]string, error)

func Merge

func Merge(nodestr ...string) (string, error)

func Split

func Split(nodelist []string, w int) [][]string

Types

type NodeSet

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

func EmptyNodeSet

func EmptyNodeSet() *NodeSet

func NewNodeSet

func NewNodeSet(nodestr string) (*NodeSet, error)

func (*NodeSet) Add

func (ns *NodeSet) Add(nodestr string) error

func (*NodeSet) Iterator

func (ns *NodeSet) Iterator() *NodeSetIterator

func (*NodeSet) Len

func (ns *NodeSet) Len() int

func (*NodeSet) MarshalJSON

func (ns *NodeSet) MarshalJSON() ([]byte, error)

func (*NodeSet) String

func (ns *NodeSet) String() string

func (*NodeSet) UnmarshalJSON

func (ns *NodeSet) UnmarshalJSON(data []byte) error

type NodeSetIterator

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

func Yield

func Yield(nodestr string) (*NodeSetIterator, error)

func (*NodeSetIterator) Len

func (i *NodeSetIterator) Len() int

func (*NodeSetIterator) Next

func (i *NodeSetIterator) Next() bool

func (*NodeSetIterator) Value

func (i *NodeSetIterator) Value() string

type Pattern

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

type RangeSet

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

func NewRangeSet

func NewRangeSet(pattern string) (rs *RangeSet, err error)

func (*RangeSet) AddSlice

func (rs *RangeSet) AddSlice(slice *Slice) error

func (*RangeSet) AddString

func (rs *RangeSet) AddString(subrange string) (err error)

func (*RangeSet) Clone

func (rs *RangeSet) Clone() *RangeSet

func (*RangeSet) Difference

func (rs *RangeSet) Difference(other *RangeSet) *RangeSet

func (*RangeSet) Empty

func (rs *RangeSet) Empty() bool

func (*RangeSet) Equal

func (rs *RangeSet) Equal(other *RangeSet) bool

func (*RangeSet) Greater

func (rs *RangeSet) Greater(other *RangeSet) bool

func (*RangeSet) InPlaceDifference

func (rs *RangeSet) InPlaceDifference(other *RangeSet)

func (*RangeSet) InPlaceIntersection

func (rs *RangeSet) InPlaceIntersection(other *RangeSet)

func (*RangeSet) InPlaceSymmetricDifference

func (rs *RangeSet) InPlaceSymmetricDifference(other *RangeSet)

func (*RangeSet) InPlaceUnion

func (rs *RangeSet) InPlaceUnion(other *RangeSet)

func (*RangeSet) Intersection

func (rs *RangeSet) Intersection(other *RangeSet) *RangeSet

func (*RangeSet) Ints

func (rs *RangeSet) Ints() []int

func (*RangeSet) Items

func (rs *RangeSet) Items() []*RangeSetItem

func (*RangeSet) Len

func (rs *RangeSet) Len() int

func (*RangeSet) Less

func (rs *RangeSet) Less(other *RangeSet) bool

func (*RangeSet) Slices

func (rs *RangeSet) Slices() []*Slice

func (*RangeSet) String

func (rs *RangeSet) String() string

func (*RangeSet) Strings

func (rs *RangeSet) Strings() []string

func (*RangeSet) Subset

func (rs *RangeSet) Subset(other *RangeSet) bool

func (*RangeSet) Superset

func (rs *RangeSet) Superset(other *RangeSet) bool

func (*RangeSet) SymmetricDifference

func (rs *RangeSet) SymmetricDifference(other *RangeSet) *RangeSet

func (*RangeSet) Union

func (rs *RangeSet) Union(other *RangeSet) *RangeSet

type RangeSetItem

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

type RangeSetND

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

func NewRangeSetND

func NewRangeSetND(args [][]string) (nd *RangeSetND, err error)

func (*RangeSetND) Dim

func (nd *RangeSetND) Dim() int

func (*RangeSetND) Dump

func (nd *RangeSetND) Dump() []string

func (*RangeSetND) Fold

func (rs *RangeSetND) Fold()

func (*RangeSetND) FormatList

func (nd *RangeSetND) FormatList() [][]interface{}

func (*RangeSetND) Iterator

func (nd *RangeSetND) Iterator() *RangeSetNDIterator

func (*RangeSetND) Len

func (nd *RangeSetND) Len() int

func (*RangeSetND) Ranges

func (nd *RangeSetND) Ranges() [][]*RangeSet

func (*RangeSetND) Sort

func (nd *RangeSetND) Sort()

func (*RangeSetND) String

func (nd *RangeSetND) String() string

func (*RangeSetND) Update

func (rs *RangeSetND) Update(other *RangeSetND) error

type RangeSetNDIterator

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

func NewRangeSetNDIterator

func NewRangeSetNDIterator() *RangeSetNDIterator

func (*RangeSetNDIterator) FormatList

func (i *RangeSetNDIterator) FormatList() []interface{}

func (*RangeSetNDIterator) IntValue

func (i *RangeSetNDIterator) IntValue() []int

func (*RangeSetNDIterator) Len

func (i *RangeSetNDIterator) Len() int

func (*RangeSetNDIterator) Next

func (i *RangeSetNDIterator) Next() bool

func (*RangeSetNDIterator) Sort

func (it *RangeSetNDIterator) Sort()

type Slice

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

func (*Slice) String

func (s *Slice) String() string

Jump to

Keyboard shortcuts

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