Documentation ¶
Overview ¶
Copyright 2020- IBM Inc. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- type CanonicalSet
- func (c *CanonicalSet) ContainedIn(other *CanonicalSet) (bool, error)
- func (c *CanonicalSet) Copy() *CanonicalSet
- func (c *CanonicalSet) Equal(other *CanonicalSet) bool
- func (c *CanonicalSet) GetCubesList() [][]*interval.CanonicalSet
- func (c *CanonicalSet) Intersect(other *CanonicalSet) *CanonicalSet
- func (c *CanonicalSet) IsEmpty() bool
- func (c *CanonicalSet) String() string
- func (c *CanonicalSet) Subtract(other *CanonicalSet) *CanonicalSet
- func (c *CanonicalSet) SwapDimensions(dim1, dim2 int) *CanonicalSet
- func (c *CanonicalSet) Union(other *CanonicalSet) *CanonicalSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CanonicalSet ¶
type CanonicalSet struct {
// contains filtered or unexported fields
}
CanonicalSet is a canonical representation for set of n-dimensional cubes, from integer intervals
func Cube ¶ added in v0.3.0
func Cube(values ...int64) *CanonicalSet
Cube returns a new CanonicalSet created from a single input cube the input cube is given as an ordered list of integer values, where each two values represent the range (start,end) for a dimension value
func FromCube ¶
func FromCube(cube []*interval.CanonicalSet) *CanonicalSet
FromCube returns a new CanonicalSet created from a single input cube the input cube is a slice of CanonicalSet, treated as ordered list of dimension values
func NewCanonicalSet ¶
func NewCanonicalSet(n int) *CanonicalSet
NewCanonicalSet returns a new empty CanonicalSet with n dimensions
func (*CanonicalSet) ContainedIn ¶
func (c *CanonicalSet) ContainedIn(other *CanonicalSet) (bool, error)
ContainedIn returns true if c is subset of other
func (*CanonicalSet) Copy ¶
func (c *CanonicalSet) Copy() *CanonicalSet
Copy returns a new CanonicalSet object, copied from c
func (*CanonicalSet) Equal ¶
func (c *CanonicalSet) Equal(other *CanonicalSet) bool
Equal return true if c equals other (same canonical form)
func (*CanonicalSet) GetCubesList ¶
func (c *CanonicalSet) GetCubesList() [][]*interval.CanonicalSet
GetCubesList returns the list of cubes in c, each cube as a slice of CanonicalSet
func (*CanonicalSet) Intersect ¶
func (c *CanonicalSet) Intersect(other *CanonicalSet) *CanonicalSet
Intersect returns a new CanonicalSet object that results from intersection of c with other
func (*CanonicalSet) IsEmpty ¶
func (c *CanonicalSet) IsEmpty() bool
IsEmpty returns true if c is empty
func (*CanonicalSet) String ¶
func (c *CanonicalSet) String() string
String returns a string representation of c
func (*CanonicalSet) Subtract ¶
func (c *CanonicalSet) Subtract(other *CanonicalSet) *CanonicalSet
Subtract returns a new CanonicalSet object that results from subtraction other from c
func (*CanonicalSet) SwapDimensions ¶ added in v0.3.0
func (c *CanonicalSet) SwapDimensions(dim1, dim2 int) *CanonicalSet
SwapDimensions returns a new CanonicalSet object, built from the input CanonicalSet object, with dimensions dim1 and dim2 swapped
func (*CanonicalSet) Union ¶
func (c *CanonicalSet) Union(other *CanonicalSet) *CanonicalSet
Union returns a new CanonicalSet object that results from union of c with other