func (sg *SubGraph) startEmbeddings(indices *digraph.Indices, startIdx int) []*IdNode { color := sg.V[startIdx].Color embs := make([]*IdNode, 0, indices.VertexColorFrequency(color)) for _, gIdx := range indices.ColorIndex[color] { embs = append(embs, &IdNode{VrtEmb: VrtEmb{Id: gIdx, Idx: startIdx}}) } return embs }
func (sg *SubGraph) vertexFrequency(indices *digraph.Indices) func(int) int { return func(idx int) int { return indices.VertexColorFrequency(sg.V[idx].Color) } }