Lines Matching refs:graph

35  * A GraphEnvironment provides a simple front-end to filter graph setup and execution using the
38 * 2. Perform any configuration, such as adding graph references and setting a GL environment.
39 * 3. Load a graph file using loadGraph() or add a graph using addGraph().
59 public GraphHandle(FilterGraph graph) {
60 mGraph = graph;
95 * @param reader The GraphReader to use for graph loading, or null to auto-create one.
97 * null if you will not load any graph files.
105 * Returns the used graph reader. This will create one, if a reader has not been set already.
115 * Add graph references to resolve during graph reading. The references added here are shared
125 * Loads a graph file from the specified resource and adds it to this environment.
128 * @param resourceId The ID of the graph resource to load.
129 * @return A unique ID for the graph.
132 // Read the file into a graph
133 FilterGraph graph = null;
135 graph = getGraphReader().readGraphResource(context, resourceId);
137 throw new RuntimeException("Could not read graph: " + e.getMessage());
140 // Add graph to our list of graphs
141 return addGraph(graph);
145 * Add a graph to the environment. Consider using loadGraph() if you are loading a graph from
146 * a graph file.
148 * @param graph The graph to add to the environment.
149 * @return A unique ID for the added graph.
151 public int addGraph(FilterGraph graph) {
152 GraphHandle graphHandle = new GraphHandle(graph);
158 * Access a specific graph of this environment given a graph ID (previously returned from
159 * loadGraph() or addGraph()). Throws an InvalidArgumentException if no graph with the
162 * @param graphId The ID of the graph to get.
163 * @return The graph with the specified ID.
168 "Invalid graph ID " + graphId + " specified in runGraph()!");
174 * Get a GraphRunner instance for the graph with the specified ID. The GraphRunner instance can
175 * be used to execute the graph. Throws an InvalidArgumentException if no graph with the
178 * @param graphId The ID of the graph to get.
179 * @param executionMode The mode of graph execution. Currently this can be either
181 * @return A GraphRunner instance for this graph.