Examples of Graph


Examples of com.turt2live.metrics.Metrics.Graph

            try {
                emetrics = new EMetrics(mcMMO.p);
                Metrics metrics = emetrics.getMetrics();

                // Timings Graph
                Graph timingsGraph = metrics.createGraph("Percentage of servers using timings");

                if (mcMMO.p.getServer().getPluginManager().useTimings()) {
                    timingsGraph.addPlotter(new Metrics.Plotter("Enabled") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    timingsGraph.addPlotter(new Metrics.Plotter("Disabled") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // Donut Version Graph
                Graph versionDonutGraph = metrics.createGraph("Donut Version");

                boolean haveVersionInformation = false;
                boolean isOfficialBuild = false;
                String officialKey = "e14cfacdd442a953343ebd8529138680";

                String version = mcMMO.p.getDescription().getVersion();

                InputStreamReader isr = new InputStreamReader(mcMMO.p.getResource(".jenkins"));
                BufferedReader br = new BufferedReader(isr);
                char[] key = new char[32];
                br.read(key);
                if (officialKey.equals(String.valueOf(key))) {
                    isOfficialBuild = true;
                }

                if (version.contains("-")) {
                    String majorVersion = version.substring(0, version.indexOf("-"));
                    String subVersion;

                    if (isOfficialBuild) {
                        int startIndex = version.indexOf("-");
                        if (version.substring(startIndex + 1).contains("-")) {
                            subVersion = version.substring(startIndex, version.indexOf("-", startIndex + 1));
                        }
                        else {
                            subVersion = "-release";
                        }
                    }
                    else {
                        subVersion = "-custom";
                    }

                    version = majorVersion + "~=~" + subVersion;
                    haveVersionInformation = true;
                }

                if (haveVersionInformation) {
                    versionDonutGraph.addPlotter(new Metrics.Plotter(version) {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // Official v Custom build Graph
                Graph officialGraph = metrics.createGraph("Built by official ci");

                if (isOfficialBuild) {
                    officialGraph.addPlotter(new Metrics.Plotter("Yes") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    officialGraph.addPlotter(new Metrics.Plotter("No") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // Chunkmeta enabled Graph
                Graph chunkmetaGraph = metrics.createGraph("Uses Chunkmeta");

                if (HiddenConfig.getInstance().getChunkletsEnabled()) {
                    chunkmetaGraph.addPlotter(new Metrics.Plotter("Yes") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    chunkmetaGraph.addPlotter(new Metrics.Plotter("No") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // Storage method Graph
                Graph storageGraph = metrics.createGraph("Storage method");

                if (Config.getInstance().getUseMySQL()) {
                    storageGraph.addPlotter(new Metrics.Plotter("SQL") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    storageGraph.addPlotter(new Metrics.Plotter("Flatfile") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // Locale Graph
                Graph localeGraph = metrics.createGraph("Locale");

                localeGraph.addPlotter(new Metrics.Plotter(LocaleLoader.getCurrentLocale().getDisplayLanguage(Locale.US)) {
                    @Override
                    public int getValue() {
                        return 1;
                    }
                });

                // ExperienceFormulaShape Graph
                Graph experienceFormulaShapeGraph = metrics.createGraph("Experience Formula Shape Graph");

                experienceFormulaShapeGraph.addPlotter(new Metrics.Plotter(ExperienceConfig.getInstance().getFormulaType().toString()) {
                    @Override
                    public int getValue() {
                        return 1;
                    }
                });

                // GlobalMultiplier Graph
                Graph globalMultiplierGraph = metrics.createGraph("Global Multiplier Graph");

                globalMultiplierGraph.addPlotter(new Metrics.Plotter(ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier() + "") {
                    @Override
                    public int getValue() {
                        return 1;
                    }
                });

                // GlobalCurveModifier Graph
                Graph globalCurveModifierGraph = metrics.createGraph("Global Curve Modifier Graph");

                globalCurveModifierGraph.addPlotter(new Metrics.Plotter(ExperienceConfig.getInstance().getMultiplier(FormulaType.LINEAR) + "") {
                    @Override
                    public int getValue() {
                        return 1;
                    }
                });

                // GlobalMultiplierGraph Fuzzy Logic Numbers
                Graph globalMultiplierGraphFuzzy = metrics.createGraph("Global Multiplier Fuzz");

                if (ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier() > 1.0) {
                    globalMultiplierGraphFuzzy.addPlotter(new Metrics.Plotter("Higher") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else if (ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier() < 1.0) {
                    globalMultiplierGraphFuzzy.addPlotter(new Metrics.Plotter("Lower") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    globalMultiplierGraphFuzzy.addPlotter(new Metrics.Plotter("Default") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // GlobalCurveModifier Fuzzy Logic Numbers
                Graph globalCurveMultiplierGraphFuzzy = metrics.createGraph("Global Curve Multiplier Fuzz");

                if (ExperienceConfig.getInstance().getMultiplier(FormulaType.LINEAR) > 20.0) {
                    globalCurveMultiplierGraphFuzzy.addPlotter(new Metrics.Plotter("Higher") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else if (ExperienceConfig.getInstance().getMultiplier(FormulaType.LINEAR) < 20.0) {
                    globalCurveMultiplierGraphFuzzy.addPlotter(new Metrics.Plotter("Lower") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    globalCurveMultiplierGraphFuzzy.addPlotter(new Metrics.Plotter("Default") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // Chimera Wing Usage Trackers
                final String chimeraGraphName = "Chimera Wing Usage";

                chimeraUseTracker = EMetrics.createBasicTracker(chimeraGraphName, "Player use");
                chimeraServerUseTracker = EMetrics.createEnabledTracker(chimeraGraphName, "Server use");

                emetrics.addTracker(chimeraUseTracker);
                emetrics.addTracker(chimeraServerUseTracker);

                // Chimera Wing Enabled Graph
                Graph chimeraGraph = metrics.createGraph("Chimera Wing");

                if (Config.getInstance().getChimaeraEnabled()) {
                    chimeraGraph.addPlotter(new Metrics.Plotter("Enabled") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    chimeraGraph.addPlotter(new Metrics.Plotter("Disabled") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }

                // Vanilla v Modified config graph
                Graph customConfigGraph = metrics.createGraph("Modified Configs");

                if (customConfig) {
                    customConfigGraph.addPlotter(new Metrics.Plotter("Edited") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
                }
                else {
                    customConfigGraph.addPlotter(new Metrics.Plotter("Vanilla") {
                        @Override
                        public int getValue() {
                            return 1;
                        }
                    });
View Full Code Here

Examples of com.vaadin.addon.timeline.gwt.client.VCanvasPlotter.Graph

            markerTooltip.setVisible(true);
            return;
        }

        for (int g = 0; g < currentGraphs.size(); g++) {
            Graph graph = currentGraphs.get(g);

            if (!widget.graphIsVisible(g) || graph.getPoints().size() == 0) {
                continue;
            }

            List<Point> points = graph.getPoints();

            // Search for index of the closes point
            float minDiff = 10000000f;
            int pointIndex = 0;
            Point p;
            for (int i = 0; i < points.size(); i++) {
                p = points.get(i);
                if (p.x < 0 || p.x > canvas.getWidth()) {
                    continue;
                }

                float diff = Math.abs(x - p.x);
                if (currentMode == PlotMode.BAR) {
                    // Barchart renders to the left of the point so we have to
                    // adjust
                    diff = Math.abs(x - (p.x - p.width / 2f));
                }

                if (diff < minDiff) {
                    minDiff = diff;
                    pointIndex = i;
                }
            }

            // Retrieve the selected point
            p = points.get(pointIndex);
            if (dots.size() > g) {
                HTML dot = dots.get(g);
                dot.setVisible(true);
                if (widget.isGraphsStacked()) {
                    float pSum = 0;
                    for (int j = 0; j < g; j++) {
                        Graph graph2 = currentGraphs.get(j);
                        Point q = graph2.getPoints().get(pointIndex);
                        if (q != null) {
                            pSum += q.y - getCurrentZeroCoordinate();
                        }
                    }
View Full Code Here

Examples of com.volantis.mcs.migrate.impl.framework.graph.Graph

    }

    // Javadoc inherited.
    public void endType() {

        Graph graph = currentGraphBuilder.getCompletedGraph();
        getCurrentTypeIdentifierBuilder().setGraph(graph);
        resourceIdentifierBuilder.addTypeIdentifier(
                getCurrentTypeIdentifierBuilder().getCompletedTypeIdentifier());
        resetCurrentTypeIdentifier();
    }
View Full Code Here

Examples of core.Graphs.Graph

//                }
//            }

//                long generatingGraphStartTime = System.nanoTime();
                GraphGenerator generator = new RandomIntervalGraphGenerator();
                Graph graph = (Graph) generator.generate(num);
//                long generatingGraphEndTime = System.nanoTime() - generatingGraphStartTime;
//            System.out.println("Generation graph time is - " + generatingGraphEndTime);
//
////            Graph graph = new Graph(a);
//            System.out.println("The matrix is:");
//            printMatrix(graph.getAdjacencyMatrix());
//            System.out.println();
//
//            long startTime = System.nanoTime();
//            System.out.println("Corresponding perfect elimination ordering is:");
//            long findingOrderStartTime = System.nanoTime();
                graph.findOrder();
//            long findingOrderEndTime = System.nanoTime() - findingOrderStartTime;
//            System.out.println("Finding order time is - " + findingOrderEndTime);
//
//            for (Vertex v : graph.getOrder()) {
//                System.out.print(v.getNumber() + " ");
//            }
//            System.out.println();
//            System.out.println();
//
//            long findingChordalityStartTime = System.nanoTime();
                graph.setChordal(graph.checkChordality());
//            long findingChordalityEndTime = System.nanoTime() - findingChordalityStartTime;
//            System.out.println("Finding chordality time is - " + findingChordalityEndTime);
//            System.out.println("Vertex properties are (RN(x) and parent(x)):");
//            for (int i = 0; i < graph.getVertices().size(); i++) {
//                System.out.print("RN" + "(" + i + "):");
//                System.out.print(graph.getVertices().get(i).getRightNeighbours() + "\t\t");
//                System.out.print("parent" + "(" + i + "):");
//                System.out.print(graph.getVertices().get(i).getParent() + "\t\t");
//                System.out.println();
//            }
//            System.out.println();
//            System.out.println();
//
//            System.out.print("Is graph chordal? ");
//            System.out.println(graph.isChordal());
                if (!graph.isChordal()) {
//                throw new IllegalStateException("GRAPH IS NOT CHORDAL");
                }
//            System.out.println();
//            System.out.println();

                if (graph.isChordal() == true) {
//                System.out.println("Corresponding cliques are:");
//                long cliqueTreeStartTime = System.nanoTime();
                    CliqueTree nodeCliqueTree = graph.findCliqueTree();
//                long cliqueTreeEndTime = System.nanoTime() - cliqueTreeStartTime;
//                System.out.println("Finding clique tree time is - " + cliqueTreeEndTime);
//                System.out.println(nodeCliqueTree.toString());
//                System.out.println();
//                long findingIntervalityStartTime = System.nanoTime();
                    List<Node> cliqueChain = graph.getIntervals(nodeCliqueTree);
//                long findingIntervalityEndTime = System.nanoTime() - findingIntervalityStartTime;
//                System.out.println("Finding intervality time is - " + findingIntervalityEndTime);
//
//                System.out.println("Graph's intervals: ");
//                for (Node interval : intervals) {
//                    System.out.println(interval.toString());
//                }
//                System.out.print("Is graph interval? ");
//                System.out.println(graph.isInterval());
                    if (!graph.isInterval()) {
                    throw new IllegalStateException("GRAPH IS NOT INTERVAL");
                    }
                }

                if (!graph.isInterval() && !graph.isChordal()) {
                    plainGrpahs++;
                }
                if (graph.isInterval()) {
                    intervalGrpahs++;
                }
                if (graph.isChordal() && !graph.isInterval()) {
                    chordalGrpahs++;
                }

//            fileWriter.append(new Long(System.nanoTime() - startTime).toString() + "\n");
View Full Code Here

Examples of cu.repsystestbed.graphs.Graph

    if(outputGraphType == OutputGraphType.COMPLETE_GRAPH)
    {
      /*
       * For every src and sink in the input graph, create an edge in the output graph
       */
      Graph graphTransitive = ((Graph)this.m_graph2Listen).getTransitiveClosureGraph();
      for(Agent src: (Set<Agent>) graphTransitive.vertexSet())
      {
        for(Agent sink: (Set<Agent>) graphTransitive.vertexSet())
        {
          if(!src.equals(sink))
          {
            m_graph2Output.addVertex(src);
            m_graph2Output.addVertex(sink);
            m_graph2Output.addEdge(src, sink);
          }
         
        }
      }
    }
    else if(outputGraphType == OutputGraphType.TRANSITIVE_GRAPH)
    {
      /*
       * Find the transitive closure edges of the input graph and add them to the output grph
       */
      Graph graphTransitive = ((Graph)this.m_graph2Listen).getTransitiveClosureGraph();
      for(TestbedEdge edge : (Set<TestbedEdge>)graphTransitive.edgeSet())
      {
        Agent src = (Agent)edge.src;
        Agent sink = (Agent)edge.sink;
        m_graph2Output.addVertex(src);
        m_graph2Output.addVertex(sink);
View Full Code Here

Examples of cz.matfyz.aai.fantom.game.Graph

    catch(Exception err) {
      System.err.println("Invalid graph file name");
      printUsage();
      return;
    }
    Graph graph = null;
    try {
      graph = new Graph(graphFile);
    }
    catch(IOException e) {
      System.err.println("Could not read the graph file");
      e.printStackTrace();
    } catch (ParserException e) {
View Full Code Here

Examples of digi.recipeManager.Metrics.Graph

    {
      metrics = new Metrics();
     
      // Graph for total recipes
     
      Graph graph = metrics.createGraph("Custom recipes");
     
      graph.addPlotter(new Metrics.Plotter("Craft recipes")
      {
        @Override
        public int getValue()
        {
          return recipes.getCraftRecipes().size();
        }
      });
     
      graph.addPlotter(new Metrics.Plotter("Combine recipes")
      {
        @Override
        public int getValue()
        {
          return recipes.getCombineRecipes().size();
        }
      });
     
      graph.addPlotter(new Metrics.Plotter("Smelt recipes")
      {
        @Override
        public int getValue()
        {
          return recipes.getSmeltRecipes().size();
        }
      });
     
      graph.addPlotter(new Metrics.Plotter("Fuels")
      {
        @Override
        public int getValue()
        {
          return recipes.getFuels().size();
View Full Code Here

Examples of diva.graph.modular.Graph

        set0.add(o2);
        set0.add(o3);
        set0.add(o4);
        set0.add(o5);

        Graph root = (Graph) model.getRoot();
        Node s0 = model.createNode(set0);
        Node n1 = model.createNode(o1);
        Node n2 = model.createNode(o2);
        Node n3 = model.createNode(o3);
        Node n4 = model.createNode(o4);
View Full Code Here

Examples of edu.indiana.extreme.xbaya.graph.Graph

     */
    public void testRemoveNode() throws ComponentException, GraphException,
            ComponentRegistryException {
        WorkflowCreator creator = new WorkflowCreator();
        Workflow workflow = creator.createSimpleMathWorkflow();
        Graph graph = workflow.getGraph();

        Node node = graph.getNode("Adder_add");
        assertNotNull(node);
        int originalSize = graph.getPorts().size();
        int portNum = node.getAllPorts().size();
        graph.removeNode(node);

        assertEquals(originalSize - portNum, graph.getPorts().size());
    }
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4graph.Graph

   /** Produces a single Graph from the given Instance and View and choice of Projection */
   public static JPanel produceGraph(AlloyInstance instance, VizState view, AlloyProjection proj) throws ErrorFatal {
      view = new VizState(view);
      if (proj == null) proj = new AlloyProjection();
      Graph graph = new Graph(view.getFontSize() / 12.0D);
      new StaticGraphMaker(graph, instance, view, proj);
      if (graph.nodes.size()==0) new GraphNode(graph, "", "Due to your theme settings, every atom is hidden.", "Please click Theme and adjust your settings.");
      return new GraphViewer(graph);
   }
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.