nikolaydubina / go-graph-layout

🔮 Graph Layout Algorithms in Go
MIT License
86 stars 1 forks source link

possible users #4

Open nikolaydubina opened 1 year ago

nikolaydubina commented 1 year ago

https://github.com/terrastruct/d2

flowchartsman commented 9 months ago

Just came across this lil' repo while actually looking to go in the opposite direction and develop a layout plugin for D2 based on the algorithms here. Got it working for the most part. In answer to this issue, however, they do not appear to link to the repo if you look at go version -m on their proprietary layout provider:

        path    github.com/terrastruct/src/backend/tala/cmd/d2plugin-tala
        mod     github.com/terrastruct/src/backend      (devel)
        dep     cdr.dev/slog    v1.4.2  h1:fIfiqASYQFJBZiASwL825atyzeA96NsqSxx2aL61P8I=
        dep     github.com/PuerkitoBio/goquery  v1.8.1  h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
        dep     github.com/ajstarks/svgo        v0.0.0-20211024235047-1546f124cd8b      h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw=
        dep     github.com/alecthomas/chroma    v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
        dep     github.com/alecthomas/participle/v2     v2.0.0-alpha7   h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c=
        dep     github.com/andybalholm/cascadia v1.3.2  h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
        dep     github.com/armon/go-radix       v1.0.0  h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
        dep     github.com/aws/aws-sdk-go       v1.42.40        h1:oZ+hyhorrkYdT23YO8s0eWBp9Fg8k4HsAFL3n0V25WA=
        dep     github.com/dlclark/regexp2      v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=
        dep     github.com/dop251/goja  v0.0.0-20230919151941-fc55792775de      h1:lA38Xtzr1Wo+iQdkN2E11ziKXJYRxLlzK/e2/fdxoEI=
        dep     github.com/elastic/go-sysinfo   v1.7.1  h1:Wx4DSARcKLllpKT2TnFVdSUJOsybqMYCNQZq1/wO+s0=
        dep     github.com/fatih/color  v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
        dep     github.com/getsentry/sentry-go  v0.12.0 h1:era7g0re5iY13bHSdN/xMkyV+5zZppjRVQhZrXCaEIk=
        dep     github.com/gin-contrib/sse      v0.1.0  h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
        dep     github.com/gin-gonic/gin        v1.7.7  h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs=
        dep     github.com/go-playground/locales        v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
        dep     github.com/go-playground/universal-translator   v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
        dep     github.com/go-playground/validator/v10  v10.10.0        h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0=
        dep     github.com/go-sourcemap/sourcemap       v2.1.3+incompatible     h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=
        dep     github.com/golang-migrate/migrate/v4    v4.15.1 h1:Sakl3Nm6+wQKq0Q62tpFMi5a503bgGhceo2icrgQ9vM=
        dep     github.com/golang/freetype      v0.0.0-20170609003504-e2365dfdc4a0      h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
        dep     github.com/golang/groupcache    v0.0.0-20210331224755-41bb18bfe9da      h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
        dep     github.com/golang/protobuf      v1.5.3  h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
        dep     github.com/google/go-cmp        v0.5.9  h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
        dep     github.com/google/go-github     v17.0.0+incompatible    h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
        dep     github.com/google/go-querystring        v1.1.0  h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
        dep     github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8      h1:gpptm606MZYGaMHMsB4Srmb6EbW/IVHnt04rcMXnkBQ=
        dep     github.com/google/uuid  v1.3.0  h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
        dep     github.com/gorilla/securecookie v1.1.1  h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
        dep     github.com/gorilla/sessions     v1.2.1  h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=
        dep     github.com/hashicorp/errwrap    v1.1.0  h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
        dep     github.com/hashicorp/go-multierror      v1.1.1  h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
        dep     github.com/jinzhu/copier        v0.3.5  h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
        dep     github.com/jmespath/go-jmespath v0.4.0  h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
        dep     github.com/joeshaw/multierror   v0.0.0-20140124173710-69b34d4ec901      h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4=
        dep     github.com/leodido/go-urn       v1.2.1  h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
        dep     github.com/lib/pq       v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk=
        dep     github.com/lucasb-eyer/go-colorful      v1.2.0  h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
        dep     github.com/mattn/go-colorable   v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
        dep     github.com/mattn/go-isatty      v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
        dep     github.com/mazznoer/csscolorparser      v0.1.3  h1:vug4zh6loQxAUxfU1DZEu70gTPufDPspamZlHAkKcxE=
        dep     github.com/pkg/errors   v0.9.1  h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
        dep     github.com/rivo/uniseg  v0.4.4  h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
        dep     github.com/rs/xid       v1.3.0  h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4=
        dep     github.com/spf13/pflag  v1.0.5  h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
        dep     github.com/ugorji/go/codec      v1.2.7  h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
        dep     github.com/yuin/goldmark        v1.5.6  h1:COmQAWTCcGetChm3Ig7G/t8AFAN00t+o8Mt4cf7JpwA=
        dep     go.elastic.co/apm       v1.15.0 h1:uPk2g/whK7c7XiZyz/YCUnAUBNPiyNeE3ARX3G6Gx7Q=
        dep     go.elastic.co/apm/module/apmsql v1.15.0 h1:QAy7tM9NwWvqMOdl8KZQsCPzy5XwYdGDkHqdd6QmGj8=
        dep     go.elastic.co/fastjson  v1.1.0  h1:3MrGBWWVIxe/xvsbpghtkFoPciPhOCmjsR/HfwEeQR4=
        dep     go.opencensus.io        v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
        dep     go.uber.org/atomic      v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
        dep     go.uber.org/multierr    v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
        dep     golang.org/x/crypto     v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
        dep     golang.org/x/exp        v0.0.0-20230905200255-921286631fa9      h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
        dep     golang.org/x/image      v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
        dep     golang.org/x/net        v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
        dep     golang.org/x/sys        v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
        dep     golang.org/x/term       v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
        dep     golang.org/x/text       v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
        dep     golang.org/x/xerrors    v0.0.0-20220907171357-04be3eba64a2      h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
        dep     gonum.org/v1/plot       v0.14.0 h1:+LBDVFYwFe4LHhdP8coW6296MBEY4nQ+Y4vuUpJopcE=
        dep     google.golang.org/protobuf      v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
        dep     gopkg.in/yaml.v2        v2.4.0  h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
        dep     howett.net/plist        v1.0.0  h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
        dep     oss.terrastruct.com/d2  v0.6.2-0.20231028191453-d09024e22d71    h1:84GVcoyBz3UvJcZTSwTjAnZ78FU2E6xUygFkXwzSGRc=
        dep     oss.terrastruct.com/util-go     v0.0.0-20230604222829-11c3c60fec14      h1:oy5vtt6O2qYxeSpqWhyevrdUenFfuhphixozUlpL6qY=

However, some of the symbol names are the same, so it's possible they used some of your routines. Tough to say:

go tool nm d2plugin-tala|rg "github.com/terrastruct/src/backend/tala\.[^(]"|rg "^[a-f0-9]{9} T"|rg -v "tala\.(?:shape|Node|OV|New|Draw|Edge)"
100a51580 T github.com/terrastruct/src/backend/tala.Autolayout
100a51990 T github.com/terrastruct/src/backend/tala.AutolayoutLocal
100a54640 T github.com/terrastruct/src/backend/tala.BuildSequence
1009dd840 T github.com/terrastruct/src/backend/tala.ClusterArrangement.Flip
1009f82a0 T github.com/terrastruct/src/backend/tala.CombineSubgraphs
1009f9840 T github.com/terrastruct/src/backend/tala.CombineSubgraphs.func1
1009eaa50 T github.com/terrastruct/src/backend/tala.Crossing.InProximityOf
1009eaa30 T github.com/terrastruct/src/backend/tala.Crossing.Surrounds
100a58a10 T github.com/terrastruct/src/backend/tala.DeserializeGraph
100a5b4c0 T github.com/terrastruct/src/backend/tala.DeserializeGraph.func1
100a5b440 T github.com/terrastruct/src/backend/tala.DeserializeGraph.func2
100a5b3c0 T github.com/terrastruct/src/backend/tala.DeserializeGraph.func3
100a5b340 T github.com/terrastruct/src/backend/tala.DeserializeGraph.func4
1009eee30 T github.com/terrastruct/src/backend/tala.EmptyHeapError.Error
100a533b0 T github.com/terrastruct/src/backend/tala.Evaluate
100a001a0 T github.com/terrastruct/src/backend/tala.GetSequenceDefiningEdges
100a534c0 T github.com/terrastruct/src/backend/tala.GraphFeatures.Score
100a541c0 T github.com/terrastruct/src/backend/tala.IdentifySequences
1009eee40 T github.com/terrastruct/src/backend/tala.NilError.Error
1009eac20 T github.com/terrastruct/src/backend/tala.ParallelIntersections
100a73760 T github.com/terrastruct/src/backend/tala.PositionedArrowheadLabel.Cost
100a83710 T github.com/terrastruct/src/backend/tala.PositionedArrowheadLabel.Overlaps
100a73300 T github.com/terrastruct/src/backend/tala.RouteChecker.check
100a54d10 T github.com/terrastruct/src/backend/tala.SerializeGraph
100a7b500 T github.com/terrastruct/src/backend/tala.Trees.Equals
1009e7720 T github.com/terrastruct/src/backend/tala.WriteToFile
1009e7870 T github.com/terrastruct/src/backend/tala.WriteToFile.func1
100a22e00 T github.com/terrastruct/src/backend/tala.addDebugEdges
100a228c0 T github.com/terrastruct/src/backend/tala.addDebugNodes
1009d9d00 T github.com/terrastruct/src/backend/tala.alignHierarchy
100a85d90 T github.com/terrastruct/src/backend/tala.alignmentNode.DebugID
100a01f40 T github.com/terrastruct/src/backend/tala.applyVirally
1009d54d0 T github.com/terrastruct/src/backend/tala.attemptShift
1009d8a90 T github.com/terrastruct/src/backend/tala.blocksRoutes
100a20ee0 T github.com/terrastruct/src/backend/tala.breakLongConnections
100a21590 T github.com/terrastruct/src/backend/tala.breakLongConnections.func1
100a6f600 T github.com/terrastruct/src/backend/tala.canOptimizeNode
100a783c0 T github.com/terrastruct/src/backend/tala.canSwapPorts
100a26360 T github.com/terrastruct/src/backend/tala.computeEdgeOffset
100a24ab0 T github.com/terrastruct/src/backend/tala.computeLevelRanks
100a310c0 T github.com/terrastruct/src/backend/tala.computeSymmetryScore
100a20b40 T github.com/terrastruct/src/backend/tala.connectPlacementNodes
100a231b0 T github.com/terrastruct/src/backend/tala.countAllCrossings
100a24580 T github.com/terrastruct/src/backend/tala.countCrossings
1009dabb0 T github.com/terrastruct/src/backend/tala.createAlignmentNodes
100a20400 T github.com/terrastruct/src/backend/tala.createPlacementNodes
100a20a90 T github.com/terrastruct/src/backend/tala.createPlacementNodes.func1
1009ef840 T github.com/terrastruct/src/backend/tala.cutNode
100a224c0 T github.com/terrastruct/src/backend/tala.debugHierarchyOptimization
100a517a0 T github.com/terrastruct/src/backend/tala.debugStage
100a51880 T github.com/terrastruct/src/backend/tala.debugStage.func1
1009ef790 T github.com/terrastruct/src/backend/tala.decreaseKeyUnchecked
100a57e40 T github.com/terrastruct/src/backend/tala.deserializeEdge
100a26c00 T github.com/terrastruct/src/backend/tala.dfsLongestPathLeveling
1009fb7b0 T github.com/terrastruct/src/backend/tala.directionCounts.getTransformsTo
1009fba10 T github.com/terrastruct/src/backend/tala.directionCounts.getTransformsTo.func1
100a24770 T github.com/terrastruct/src/backend/tala.doesCross
100a77eb0 T github.com/terrastruct/src/backend/tala.doesNotPassThroughNodes
1009e81e0 T github.com/terrastruct/src/backend/tala.drawGraphInContext
1009e88f0 T github.com/terrastruct/src/backend/tala.drawGraphInContext.func1
100a1d3e0 T github.com/terrastruct/src/backend/tala.edgeCanOverlapEdges
100a78070 T github.com/terrastruct/src/backend/tala.edgesIntersect
1009d8f10 T github.com/terrastruct/src/backend/tala.estimateEdgeSegments
100a817c0 T github.com/terrastruct/src/backend/tala.estimateEdgeSegments.func1
100a73080 T github.com/terrastruct/src/backend/tala.fillPath
100a095d0 T github.com/terrastruct/src/backend/tala.findBestEdgeLabelPosition
100a0a6b0 T github.com/terrastruct/src/backend/tala.findBestEdgeLabelPosition.func1
100a25890 T github.com/terrastruct/src/backend/tala.findLoopPortsForEdge
100a0ba00 T github.com/terrastruct/src/backend/tala.findSharedSegments
100a0be40 T github.com/terrastruct/src/backend/tala.findSharedSegments.func1
100a0c510 T github.com/terrastruct/src/backend/tala.findSharedSegments.func1.1
100a0c340 T github.com/terrastruct/src/backend/tala.findSharedSegments.func1.3
100a53ac0 T github.com/terrastruct/src/backend/tala.getAlignedNodes
100a243f0 T github.com/terrastruct/src/backend/tala.getAllDescendants
100a1e480 T github.com/terrastruct/src/backend/tala.getAngle
100a23a40 T github.com/terrastruct/src/backend/tala.getBestIndexBySwappingNeighbors
100a7dfe0 T github.com/terrastruct/src/backend/tala.getCandidateRoots
100a25e50 T github.com/terrastruct/src/backend/tala.getClosestPorts
100a23d70 T github.com/terrastruct/src/backend/tala.getCrossLevelSegments
100a23f20 T github.com/terrastruct/src/backend/tala.getCrossLevelSegments.func1
100a23e60 T github.com/terrastruct/src/backend/tala.getCrossLevelSegments.func2
100a255d0 T github.com/terrastruct/src/backend/tala.getEdgesInOrder
100a81630 T github.com/terrastruct/src/backend/tala.getEdgesInOrder.func1
100a256a0 T github.com/terrastruct/src/backend/tala.getEdgesInOrder.func2
100a0b7d0 T github.com/terrastruct/src/backend/tala.getLabelPercentageSearchRange
1009db4a0 T github.com/terrastruct/src/backend/tala.getLeafNodes
1009dbe90 T github.com/terrastruct/src/backend/tala.getMedianNeighbors
1009dc330 T github.com/terrastruct/src/backend/tala.getMedianNeighbors.func1
100a21df0 T github.com/terrastruct/src/backend/tala.getMinimumDistanceToNextLevel
100a1baf0 T github.com/terrastruct/src/backend/tala.getNodeCandidatePositions
100a6b540 T github.com/terrastruct/src/backend/tala.getNodesInDescendingDegreeOrder
100a6b710 T github.com/terrastruct/src/backend/tala.getNodesInDescendingDegreeOrder.func1
1009eaa90 T github.com/terrastruct/src/backend/tala.getOrthogonalEndSegments
100a1dcd0 T github.com/terrastruct/src/backend/tala.getOverlappingEdges
100a7dc90 T github.com/terrastruct/src/backend/tala.getRootsByTreeDirection
1009d8cc0 T github.com/terrastruct/src/backend/tala.getSegments
100a7ef00 T github.com/terrastruct/src/backend/tala.getTreeEdgeMidpoints
100a6ae80 T github.com/terrastruct/src/backend/tala.globalSifting
100a02680 T github.com/terrastruct/src/backend/tala.groupSheep
100a1e500 T github.com/terrastruct/src/backend/tala.hasSharpAngleToBorder
1009dd330 T github.com/terrastruct/src/backend/tala.horizontalCompaction
100a81c90 T github.com/terrastruct/src/backend/tala.init
100a349d0 T github.com/terrastruct/src/backend/tala.intersects
100a0c530 T github.com/terrastruct/src/backend/tala.isClusterPathShared
100a223a0 T github.com/terrastruct/src/backend/tala.isHorizontalHierarchy
100a72a10 T github.com/terrastruct/src/backend/tala.isOnFlightPlan
100a1dbf0 T github.com/terrastruct/src/backend/tala.isVerticalOrHorizontalOverlap
100a242f0 T github.com/terrastruct/src/backend/tala.iterAllDescendants
100a261b0 T github.com/terrastruct/src/backend/tala.makeBendPoint
100a25ad0 T github.com/terrastruct/src/backend/tala.makeLoopPorts
100a05250 T github.com/terrastruct/src/backend/tala.makeSimpleDAG
1009dc3d0 T github.com/terrastruct/src/backend/tala.markConflicts
1009da9a0 T github.com/terrastruct/src/backend/tala.median
1009dab30 T github.com/terrastruct/src/backend/tala.median.func1
100a23550 T github.com/terrastruct/src/backend/tala.minimizeCrossings
100a233a0 T github.com/terrastruct/src/backend/tala.minimizeHierarchyCrossings
100a22300 T github.com/terrastruct/src/backend/tala.mirrorX
100a81730 T github.com/terrastruct/src/backend/tala.mirrorX.func1
100a22350 T github.com/terrastruct/src/backend/tala.mirrorY
100a816e0 T github.com/terrastruct/src/backend/tala.mirrorY.func1
100a26470 T github.com/terrastruct/src/backend/tala.networkSimplex
100a43110 T github.com/terrastruct/src/backend/tala.newOVGEdgeRouter
100a34cb0 T github.com/terrastruct/src/backend/tala.nonParallelIntersection
100a2fef0 T github.com/terrastruct/src/backend/tala.numPointsWithinManhattanDistance
100a72730 T github.com/terrastruct/src/backend/tala.overshot
1009dd450 T github.com/terrastruct/src/backend/tala.placeBlock
100a02c50 T github.com/terrastruct/src/backend/tala.placeChildrenOrder
100a21c00 T github.com/terrastruct/src/backend/tala.placeDescendants
100a21850 T github.com/terrastruct/src/backend/tala.placeNodesByLevel
100a1fe60 T github.com/terrastruct/src/backend/tala.placeNodesInHierarchy
100a18980 T github.com/terrastruct/src/backend/tala.placeNodesOrthogonally
100a72be0 T github.com/terrastruct/src/backend/tala.preferLaunchingVertically
100a21650 T github.com/terrastruct/src/backend/tala.removeTableColumnNodes
100a070e0 T github.com/terrastruct/src/backend/tala.reverseEdges
100a16ce0 T github.com/terrastruct/src/backend/tala.routeInSShape
100a17180 T github.com/terrastruct/src/backend/tala.routeInSShape.func1
100a26010 T github.com/terrastruct/src/backend/tala.routeLoop
100a252a0 T github.com/terrastruct/src/backend/tala.routeLoops
100a537b0 T github.com/terrastruct/src/backend/tala.scoreNodeAligments
100a34710 T github.com/terrastruct/src/backend/tala.segmentIntersectsBox
100a570b0 T github.com/terrastruct/src/backend/tala.serializeEdge
100a569b0 T github.com/terrastruct/src/backend/tala.serializeNode
100a575b0 T github.com/terrastruct/src/backend/tala.serializeTree
100a6b800 T github.com/terrastruct/src/backend/tala.sifting
100a6d2d0 T github.com/terrastruct/src/backend/tala.sizedOptimizer.FindClosestUnoccupiedDistance
1009dba10 T github.com/terrastruct/src/backend/tala.sortAlignmentNodes
1009dbde0 T github.com/terrastruct/src/backend/tala.sortAlignmentNodes.func1
1009dbd30 T github.com/terrastruct/src/backend/tala.sortAlignmentNodes.func2
1009dbc80 T github.com/terrastruct/src/backend/tala.sortAlignmentNodes.func3
1009dbbd0 T github.com/terrastruct/src/backend/tala.sortAlignmentNodes.func4
100a43610 T github.com/terrastruct/src/backend/tala.sortEdges
100a43c00 T github.com/terrastruct/src/backend/tala.sortEdges.func1
100a43b40 T github.com/terrastruct/src/backend/tala.sortEdges.func2
100a439d0 T github.com/terrastruct/src/backend/tala.sortEdges.func3
100a43890 T github.com/terrastruct/src/backend/tala.sortEdges.func4
100a24820 T github.com/terrastruct/src/backend/tala.sortLevelNodesByAdacencyPosition
100a249b0 T github.com/terrastruct/src/backend/tala.sortLevelNodesByAdacencyPosition.func1
100a248f0 T github.com/terrastruct/src/backend/tala.sortLevelNodesByAdacencyPosition.func2
100a2ef70 T github.com/terrastruct/src/backend/tala.sortNodesByID
100a2f010 T github.com/terrastruct/src/backend/tala.sortNodesByID.func1
1009da700 T github.com/terrastruct/src/backend/tala.syncContainers
100a222b0 T github.com/terrastruct/src/backend/tala.transpose
100a81780 T github.com/terrastruct/src/backend/tala.transpose.func1
1009d4ec0 T github.com/terrastruct/src/backend/tala.tryMove
1009d5450 T github.com/terrastruct/src/backend/tala.tryMove.func1
100a725b0 T github.com/terrastruct/src/backend/tala.undershot
1009dca10 T github.com/terrastruct/src/backend/tala.verticalAlignment
100a9be80 T type:.eq.github.com/terrastruct/src/backend/tala.Crossing
100a9c1c0 T type:.eq.github.com/terrastruct/src/backend/tala.Entry
100a9bf60 T type:.eq.github.com/terrastruct/src/backend/tala.GraphFeatures
100a9c110 T type:.eq.github.com/terrastruct/src/backend/tala.Icon
100a9c190 T type:.eq.github.com/terrastruct/src/backend/tala.IdealTurnAxis
100a9bda0 T type:.eq.github.com/terrastruct/src/backend/tala.Label
100a9c0b0 T type:.eq.github.com/terrastruct/src/backend/tala.PositionedArrowheadLabel
100a9c080 T type:.eq.github.com/terrastruct/src/backend/tala.Range
100a9bef0 T type:.eq.github.com/terrastruct/src/backend/tala.SizeFeatures
100a9c030 T type:.eq.github.com/terrastruct/src/backend/tala.Spacing
100a9c270 T type:.eq.github.com/terrastruct/src/backend/tala.loopPorts
100a9c3f0 T type:.eq.github.com/terrastruct/src/backend/tala.searchNodeContext
100a9c440 T type:.hash.github.com/terrastruct/src/backend/tala.Range
nikolaydubina commented 9 months ago

thanks for hint! to be honest, this project is not finished, so whoever wants to hardfork it and actually make it work is free to do so, even if it is closed or even commercial software. I wish they open sourced it tho.

hm, actually I think I talked to these guys few years back (maybe reddit?), they wanted to use it. glad they made it work on their side (if it is true in Go and not cgo calls to graphviz).

flowchartsman commented 9 months ago

It’s kind of funny how they did it, actually. Both the ELK and Dagre engines just embed the JavaScript with goja and do some shimming and cleanup. A lot of cleanup, actually. I ended up having to copy most of their pre/post-processing code from those engines just to get the rendering engine enough information not to panic on the other side of go-graph layout. But it works, and is honestly pretty clever.

For my part, I have the Sugiyama example mostly running, but with a couple minor bugaboos, which as far as I can tell makes this plugin the very first external layout provided the project has. I’d gladly fork the work, but I could use a little guidance on what “80%” entails on the unfinished algorithms and where you left off on.

nikolaydubina commented 9 months ago

nice. if you want hard fork, feel free. glad someone is working on this.

major hurdle that is left (where I stopped last time) is at point of optimization algorithms. Go does not have any, and re-implementing those would require even more effort besides of just graph layout. (things like "find optimal very high dimension float tensor that minimises this objective function" and many more things like that, e.g. Linear Programming)

to proceed further, I recommend two directions (can be done in parallel):

  1. re-implement official C graphviz code. AFAIK that is state-of-the-art graph layout even still. every major code I saw is calling it at some point.
  2. proceed implementing official graph layout papers. (I was following this path, but was stuck at numerical optimisation layers).
nikolaydubina commented 9 months ago

There is also very nice visualisations possible (Metro style edges sticky grouping at nodes), but those would require simulating edges as graphs themselves and run some optimisation algorithms as well. Or a lot of careful code to generate that manually.

nikolaydubina commented 9 months ago

One last thing, I intended to use this graph layout algorithms to build Go WASM online graph editing tool. So recommend to develop visualisation as well, as it will help to iterate on it. (I developed one as well, but got it lost somewhere). Inspiration here: https://github.com/nikolaydubina/graph-tools-gallery