public interface ComputableGraphBuilder<T extends ComputableGraph>
| Modifier and Type | Method and Description |
|---|---|
VariableReference |
add(VariableReference left,
VariableReference right)
Creates an addition operation for the left and right arguments.
|
T |
build() |
void |
connect(java.util.Map<? extends Vertex<?>,? extends Vertex<?>> connections) |
default void |
convert(java.util.Collection<? extends Vertex> vertices) |
default void |
convert(java.util.Collection<? extends Vertex> vertices,
java.util.Collection<? extends Vertex> outputs) |
void |
create(Vertex visiting) |
void |
createConstant(Vertex visiting) |
void |
createVariable(Vertex visiting) |
java.util.Collection<VariableReference> |
getLatentVariables() |
void |
registerOutput(VariableReference output) |
void createConstant(Vertex visiting)
visiting - create this vertex as a constant in the computable graph that is being built.void createVariable(Vertex visiting)
visiting - create this vertex as a variable in the computable graph that is being built.void create(Vertex visiting)
visiting - create this vertex in the compiled graph that is being built.void connect(java.util.Map<? extends Vertex<?>,? extends Vertex<?>> connections)
connections - tells the graph builder that any time a vertex is referenced in a connection to reroute it
to another vertex. This is used to hook up proxy vertices that aren't actually connected to
parents until they are being added to a graph with this builder.void registerOutput(VariableReference output)
output - a variable reference to a variable that should be used as an output. This lets the builder know that
the variable should not be mutated and to possibly trim any operations that is not needed for this
output.java.util.Collection<VariableReference> getLatentVariables()
VariableReference add(VariableReference left, VariableReference right)
left - a variable reference to the left argright - a variable reference to the right argT build()
default void convert(java.util.Collection<? extends Vertex> vertices, java.util.Collection<? extends Vertex> outputs)
vertices - vertices that represent a graph to create a computable graph from.outputs - explicitly specified outputs. This allows the builder to prune operations not needed in order
to provide the outputs.default void convert(java.util.Collection<? extends Vertex> vertices)
vertices - vertices that represent a graph to create a computable graph from.