Package core.Trees

Examples of core.Trees.CliqueTree.addNode()


        CliqueTree cliqueTree = new CliqueTree();
        Vertex root = order[order.length - 1];
        ArrayList<Vertex> rootCliqueVertices = new ArrayList<Vertex>();
        rootCliqueVertices.add(root);
        Node initialClique = new Node(null, rootCliqueVertices);
        cliqueTree.addNode(initialClique);
        vertexCliqueMap.put(root, initialClique);
        for (int i = order.length - 2; i >= 0; i--) {
            Vertex x = order[i];
            ArrayList<Vertex> RNwithoutParent = new ArrayList<Vertex>(x.getRightNeighbours());
            RNwithoutParent.remove(x.getParent());
View Full Code Here


                ArrayList<Vertex> cliqueVertices = new ArrayList<Vertex>();
                cliqueVertices.add(x);
                cliqueVertices.addAll(x.getRightNeighbours());
                Node clique = new Node(vertexCliqueMap.get(x.getParent()), cliqueVertices);
                vertexCliqueMap.put(x, clique);
                cliqueTree.addNode(clique);
            } else {
                Node parentClique = vertexCliqueMap.get(x.getParent());
                ArrayList<Vertex> cliqueVerteces = new ArrayList<Vertex>();
                boolean similarRN = false;
                for (Vertex vertex : parentClique.getData()) {
View Full Code Here

                } else {
                    cliqueVerteces.add(x);
                    cliqueVerteces.addAll(x.getRightNeighbours());
                    Node clique = new Node(vertexCliqueMap.get(x.getParent()), cliqueVerteces);
                    vertexCliqueMap.put(x, clique);
                    cliqueTree.addNode(clique);
                }
            }
        }
        return cliqueTree;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.