np-guard / models

Models for connectivity and network resources
https://pkg.go.dev/github.com/np-guard/models
Apache License 2.0
1 stars 0 forks source link

Move connectionset from analyzer and protocols from synthesizer #10

Closed elazarg closed 3 months ago

elazarg commented 4 months ago

Reopening #8.

Main differences from the version in the synthesizer:

elazarg commented 3 months ago

I realized that the dimension types encode the order of the dimensions, which makes it harder to know what depends on the order of the dimensions, and contradicts the comment preceding dimensionsList:

// this should be the only place where the order is hard-coded

So the last commit changes the type of Dimension from int to string; the index of each dimension in a cube is looked up in the slice dimensionsList. It also delegates most of the work of swapping dimensions to the underlying hypercube set.