package spore
import "github.com/d2lang/elk-go/internal/core"
func Register (registry *core .AlgorithmRegistry ) error {
algorithms := []core .AlgorithmData {
{
ID : OverlapAlgorithmID ,
Create : func () core .LayoutProvider { return &overlapProvider {algorithms : registry } },
KnownOptions : []string {
UnderlyingLayoutAlgorithm .ID ,
Padding .ID ,
SpacingNodeNode .ID ,
StructureExtraction .ID ,
MaxIterations .ID ,
RunScanline .ID ,
DebugMode .ID ,
},
},
{
ID : CompactionAlgorithmID ,
Create : func () core .LayoutProvider { return &compactionProvider {algorithms : registry } },
KnownOptions : []string {
UnderlyingLayoutAlgorithm .ID ,
TreeConstruction .ID ,
SpanningTreeCost .ID ,
PreferredRoot .ID ,
RootSelection .ID ,
Padding .ID ,
SpacingNodeNode .ID ,
StructureExtraction .ID ,
Compaction .ID ,
Orthogonal .ID ,
DebugMode .ID ,
},
},
}
for _ , algorithm := range algorithms {
if err := registry .Register (algorithm ); err != nil {
return err
}
}
return nil
}
The pages are generated with Golds v0.8.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .