Giter Site home page Giter Site logo

Different Spanning Trees about boruvkamst HOT 1 CLOSED

orange451 avatar orange451 commented on July 19, 2024
Different Spanning Trees

from boruvkamst.

Comments (1)

Roas avatar Roas commented on July 19, 2024

After some further testing, it is primarily just vertex f I'm having a big fight with.

// Create all vertices used. Position is not relevant.
Vertex a = new Vertex();
Vertex b = new Vertex();
Vertex c = new Vertex();
Vertex d = new Vertex();
Vertex e = new Vertex();
Vertex f = new Vertex();
Vertex g = new Vertex();
Vertex h = new Vertex();
Vertex i = new Vertex();
Vertex j = new Vertex();
Vertex k = new Vertex();
Vertex l = new Vertex();
Vertex m = new Vertex();
// Create all edges. Vertex objects are used.
Edge ab = new Edge( a, b, 8 );
Edge bd = new Edge( b, d, 15 );
Edge dc = new Edge( d, c, 7 );
Edge ca = new Edge( c, a, 6 );
Edge dm = new Edge( d, m, 9 );
Edge fb = new Edge( f, b, 4 );
Edge ga = new Edge( g, a, 10 );
Edge ha = new Edge( h, a, 2 );
Edge hi = new Edge( h, i, 1 );
Edge kc = new Edge( k, c, 10 );
Edge dl = new Edge( d, l, 4 );
Edge cj = new Edge( c, j, 9 );
Edge gh = new Edge( g, h, 4 );
Edge fe = new Edge( f, e, 9 );
Edge em = new Edge( e, m, 4 );
Edge kl = new Edge( k, l, 11 );
Edge ji = new Edge( j, i, 8 );
Edge eb = new Edge( e, b, 8);

    vertices.add(a);
    vertices.add(b);
    vertices.add(c);
    vertices.add(d);
    vertices.add(e);

// vertices.add(f);
vertices.add(g);
vertices.add(h);
vertices.add(i);
vertices.add(j);
// vertices.add(k);
// vertices.add(l);
// vertices.add(m);

    edges.add(ab);
    edges.add(bd);
    edges.add(dc);
    edges.add(ca);

// edges.add(dm);
// edges.add(fb);
edges.add(ga);
edges.add(ha);
edges.add(hi);
// edges.add(kc);
// edges.add(dl);
// edges.add(cj);
edges.add(gh);
// edges.add(fe);
// edges.add(em);
// edges.add(kl);
edges.add(ji);
edges.add(eb);

from boruvkamst.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.