Get the factor graph being constructed with this builder.

@return
9563
public ParametricFactorGraph build() {
    return new ParametricFactorGraph(new DynamicFactorGraph(variables, constantFactors, constantFactorNames),
        parametricFactors, factorPatterns, parametricFactorNames); 
  }
1297494
@JavaScriptMethod
    public JSONObject getGraphData() {
        JSONObject projectDataSet = new JSONObject();
        if (_projectResult == null) {
//            getUpdatedData();
            return new JSONObject();
        }


        for (SortedMap.Entry<String, LrProjectScenarioResults> scenarioResults : _projectResult.getScenarioResults()
                .entrySet()) {

            JSONObject scenarioData = new JSONObject();
            JSONObject scenarioStats = new JSONObject();
            //            LrGraphUtils
            //                    .constructVuserSummary(scenarioResults.getValue().getvUserSummary(), scenarioStats, _workedBuilds
            //                            .size());
            //            LrGraphUtils.constructDurationSummary(scenarioResults.getValue().getDurationData(), scenarioStats);
            //            LrGraphUtils.constructConnectionSummary(scenarioResults.getValue().getMaxConnectionsCount(), scenarioStats);
            //            LrGraphUtils.constructTransactionSummary(scenarioResults.getValue().getTransactionSum(), scenarioStats,
            //                    _workedBuilds.size());


            scenarioData.put("scenarioStats", scenarioStats);

            JSONObject scenarioGraphData = new JSONObject();
            //Scenario data graphs
//            LrGraphUtils.constructVuserGraph(scenarioResults, scenarioGraphData);
//            LrGraphUtils.constructConnectionsGraph(scenarioResults, scenarioGraphData);
            //Scenario SLA graphs
            LrGraphUtils.constructTotalHitsGraph(scenarioResults, scenarioGraphData);
            LrGraphUtils.constructAvgHitsGraph(scenarioResults, scenarioGraphData);
            LrGraphUtils.constructTotalThroughputGraph(scenarioResults, scenarioGraphData);
            LrGraphUtils.constructAverageThroughput(scenarioResults, scenarioGraphData);
            LrGraphUtils.constructErrorGraph(scenarioResults, scenarioGraphData);
            LrGraphUtils.constructAvgTransactionGraph(scenarioResults, scenarioGraphData);
            LrGraphUtils.constructPercentileTransactionGraph(scenarioResults, scenarioGraphData);

            scenarioData.put("scenarioData", scenarioGraphData);

            String scenarioName = scenarioResults.getKey();
            projectDataSet.put(scenarioName, scenarioData);
        }
        return projectDataSet;
    }
1003050
private Batch getBatchForGraph() {
		Batch lastValidBatch = this.batches.isEmpty() ? null : this.batches.get(this.batches.size()-1);
		
		if (lastValidBatch != null && lastValidBatch.graphSize() < this.maxBatchSize)
			return lastValidBatch;
		else {
			Batch next = new Batch(this, this.mapper, this.accessToken, this.apiVersion, this.timeout, this.retries);
			this.batches.add(next);
			return next;
		}
	}
827292
public static List<DiscreteFactor> coerceToDiscrete(Collection<Factor> factors) {
    List<DiscreteFactor> returnFactors = Lists.newArrayList();
    for (Factor factor : factors) {
      returnFactors.add(factor.coerceToDiscrete());
    }
    return returnFactors;
  }
960262
public CfgParseTree getBestParseTree() {
    Factor rootMarginal = getMarginalEntries(0, chartSize() - 1);
    Assignment bestAssignment = rootMarginal.getMostLikelyAssignments(1).get(0);
    return getBestParseTree(bestAssignment.getOnlyValue());
  }
884008
public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder() {
    if (valueCase_ == 8) {
       return (org.tensorflow.framework.TensorProto) value_;
    }
    return org.tensorflow.framework.TensorProto.getDefaultInstance();
  }
1090882
public org.tensorflow.framework.CostGraphDef getCostGraph() {
    return costGraph_ == null ? org.tensorflow.framework.CostGraphDef.getDefaultInstance() : costGraph_;
  }
507586
public List<IntArrayList> findComponents() {
        int nodes = graph.getNodes();
        for (int start = 0; start < nodes; start++) {
            if (nodeIndex[start] == 0
                    && !ignoreSet.contains(start)
                    && !graph.isNodeRemoved(start))
                strongConnect(start);
        }

        return components;
    }
812560
public Factor getBinaryRuleExpectations() {
    Tensor binaryRuleWeights = binaryRuleDistribution.coerceToDiscrete().getWeights();
    SparseTensor tensor = SparseTensor.copyRemovingZeros(binaryRuleWeights,
        binaryRuleExpectations);

    return new TableFactor(binaryRuleDistribution.getVars(), tensor);
  }
870161
public FactorGraph readBnAsFg(InputStream networkIs, InputStream cpdIs) throws IOException {
        // Read network file.
        BufferedReader networkReader = new BufferedReader(new InputStreamReader(networkIs));
        // -- read the number of variables.
        int numVars = Integer.parseInt(networkReader.readLine().trim());
        varMap = new HashMap<String,Var>();
        VarSet allVars = new VarSet();
        for (int i = 0; i < numVars; i++) {
            Var var = parseVar(networkReader.readLine());
            allVars.add(var);
            varMap.put(var.getName(), var);
        }
        assert (allVars.size() == numVars);    
        // -- read the dependencies between variables.
        // ....or not...
        
        networkReader.close();
                
        // Read CPD file.
        BufferedReader cpdReader = new BufferedReader(new InputStreamReader(cpdIs));
        
        factorMap = new LinkedHashMap<VarSet, ExplicitFactor>();
        String line;
        while ((line = cpdReader.readLine()) != null) {
            // Parse out the variable configuration.           
            VarConfig config = new VarConfig();
            String[] assns = whitespaceOrComma.split(line);
            for (int i=0; i<assns.length-1; i++) {
                String assn = assns[i];
                String[] va = equals.split(assn);
                assert(va.length == 2);
                String varName = va[0];
                String stateName = va[1];
                config.put(varMap.get(varName), stateName);
            }
            
            // The double is the last value on the line.
            double value = Double.parseDouble(assns[assns.length-1]);
            // Factor graphs store the log value.
            value = FastMath.log(value);
            
            // Get the factor for this configuration, creating a new one if necessary.
            VarSet vars = config.getVars();
            ExplicitFactor f = factorMap.get(vars);
            if (f == null) { f = new ExplicitFactor(vars); }
            
            // Set the value in the factor.
            f.setValue(config.getConfigIndex(), value);
            factorMap.put(vars, f);
        }
        
        cpdReader.close();
        
        
        // Create the factor graph.
        FactorGraph fg = new FactorGraph();
        for (ExplicitFactor f : factorMap.values()) {
            fg.addFactor(f);
        }        
        return fg;
    }
712275
public Request<List<Factor>> listFactors() {
        String url = baseUrl
                .newBuilder()
                .addPathSegments("api/v2/guardian/factors")
                .build()
                .toString();
        CustomRequest<List<Factor>> request = new CustomRequest<>(client, url, "GET", new TypeReference<List<Factor>>() {
        });
        request.addHeader("Authorization", "Bearer " + apiToken);
        return request;
    }
474170
private function getSingleUndirectedRelation()
    {
        $ed = $this->getEdgeDefinitions();
        if (count($ed) > 0) {
            $a = $ed[0];
            $b = $a->getFromCollections();
            $c = $a->getToCollections();
        }
        if (count($ed) > 1 ||
            (
                count($ed) === 1 && (
                    count($a->getFromCollections()) > 1 ||
                    count($a->getToCollections()) > 1 ||
                    $b[0] !== $c[0]

                )
            )
        ) {
            throw new ClientException('This operation only supports graphs with one undirected single collection relation');
        }
        if (count($ed) === 1) {
            $eD                     = $ed[0];
            $this->_edgeDefinitions = [];
        } else {
            $eD = new EdgeDefinition();
        }

        return $eD;
    }
510413
public Graph<Node> moduleGraph() {
        Graph.Builder<Node> builder = new Graph.Builder<>();

        archives().stream()
            .forEach(m -> {
                Node u = new Node(m.getName(), Info.REQUIRES);
                builder.addNode(u);
                analyzer.requires(m)
                    .map(req -> new Node(req.getName(), Info.REQUIRES))
                    .forEach(v -> builder.addEdge(u, v));
            });
        return builder.build();
    }
517997
public static FactorGraph getFgLat(FactorGraph fgLatPred, VarConfig goldConfig) {
        // TODO: instead, have this just look at whether or not the var is in the gold config
        List<Var> predictedVars = VarSet.getVarsOfType(fgLatPred.getVars(), VarType.PREDICTED);
        VarConfig predConfig = goldConfig.getIntersection(predictedVars);
        FactorGraph fgLat = fgLatPred.getClamped(predConfig);
        assert (fgLatPred.getNumFactors() <= fgLat.getNumFactors());
        return fgLat;
    }
643020
public Graph<T> next() {
        if (nextSubgraphs.isEmpty()) 
            throw new NoSuchElementException();
        Graph<T> next = nextSubgraphs.poll();
        
        // If we've exhausted the current set of subgraphs, queue up more of
        // them, generated from the remaining vertices
        if (nextSubgraphs.isEmpty())
            advance();
        return next;
    }
8741
public String graph() {// throws Exception {
        StringBuffer text = new StringBuffer();

        text.append("digraph CobwebTree {\n");
        m_cobwebTree.graphTree(text);
        text.append("}\n");
        return text.toString();
    }
818547
public NamedSubgraph<NamedEntityGraph<T>> getOrCreateSubgraph()
   {
      List<Node> nodeList = childNode.get("subgraph");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new NamedSubgraphImpl<NamedEntityGraph<T>>(this, "subgraph", childNode, nodeList.get(0));
      }
      return createSubgraph();
   }