func (n *node) Children() []Node {
	if n.IsNil() {
		return nil
	}
	return n.children
}
Children returns the children of this node.
package topologyaware
import (
	"fmt"
	system "github.com/intel/cri-resource-manager/pkg/sysfs"
	"github.com/intel/cri-resource-manager/pkg/topology"
	idset "github.com/intel/goresctrl/pkg/utils"
	"k8s.io/kubernetes/pkg/kubelet/cm/cpuset"
	"github.com/intel/cri-resource-manager/pkg/cri/resource-manager/kubernetes"
)
type NodeKind string
const (
	NilNode NodeKind = ""
	UnknownNode NodeKind = "unknown"
	SocketNode NodeKind = "socket"
	DieNode NodeKind = "die"
	NumaNode NodeKind = "numa node"
	VirtualNode NodeKind = "virtual node"
)
const (
	OverfitPenalty = 0.9
)
type Node interface {
	IsNil() bool
	Name() string
	Kind() NodeKind
	NodeID() int
	Parent() Node
	Children() []Node
	LinkParent(Node)
	AddChildren([]Node)
	IsSameNode(Node) bool
	IsRootNode() bool
	IsLeafNode() bool
	RootDistance() int
	NodeHeight() int
	System() system.System
	Policy() *policy
	DiscoverSupply(assignedNUMANodes []idset.ID) Supply
	GetSupply() Supply
	FreeSupply() Supply
	GrantedReservedCPU() int
	GrantedSharedCPU() int
	GetMemset(mtype memoryType) idset.IDSet
	AssignNUMANodes(ids []idset.ID)
	DepthFirst(func(Node) error) error
	BreadthFirst(func(Node) error) error
	Dump(string, ...int)
	dump(string, ...int)
	GetMemoryType() memoryType
	HasMemoryType(memoryType) bool
	GetPhysicalNodeIDs() []idset.ID
	GetScore(Request) Score
	HintScore(topology.Hint) float64
}
type node struct {
	policy   *policy      
	self     nodeself     
	name     string       
	id       int          
	kind     NodeKind     
	depth    int          
	parent   Node         
	children []Node       
	noderes  Supply       
	freeres  Supply       
	mem      idset.IDSet  
	pMem     idset.IDSet  
	hbm      idset.IDSet  
}
type nodeself struct {
	node Node
}
type socketnode struct {
	node                      
	id     idset.ID           
	syspkg system.CPUPackage  
}
type dienode struct {
	node                      
	id     idset.ID           
	syspkg system.CPUPackage  
}
type numanode struct {
	node                 
	id      idset.ID     
	sysnode system.Node  
}
type virtualnode struct {
	node  
}
var nilnode Node = &node{
	name:     "<nil node>",
	id:       -1,
	kind:     NilNode,
	depth:    -1,
	children: nil,
}
func (n *node) init(p *policy, name string, kind NodeKind, parent Node) {
	n.policy = p
	n.name = name
	n.kind = kind
	n.parent = parent
	n.id = -1
	n.LinkParent(parent)
	n.mem = idset.NewIDSet()
	n.pMem = idset.NewIDSet()
	n.hbm = idset.NewIDSet()
}
func (n *node) IsNil() bool {
	return n.kind == NilNode
}
func (n *node) Name() string {
	if n.IsNil() {
		return "<nil node>"
	}
	return n.name
}
func (n *node) Kind() NodeKind {
	return n.kind
}
func (n *node) NodeID() int {
	if n.IsNil() {
		return -1
	}
	return n.id
}
func (n *node) IsSameNode(other Node) bool {
	return n.NodeID() == other.NodeID()
}
func (n *node) IsRootNode() bool {
	return n.parent.IsNil()
}
func (n *node) IsLeafNode() bool {
	return len(n.children) == 0
}
func (n *node) RootDistance() int {
	if n.IsNil() {
		return -1
	}
	return n.depth
}
func (n *node) NodeHeight() int {
	if n.IsNil() {
		return -1
	}
	return n.policy.depth - n.depth
}
func (n *node) Parent() Node {
	if n.IsNil() {
		return nil
	}
	return n.parent
}