public class KeanuCompiledGraphBuilder extends java.lang.Object implements ComputableGraphBuilder<ComputableGraph>
| Constructor and Description |
|---|
KeanuCompiledGraphBuilder() |
| Modifier and Type | Method and Description |
|---|---|
VariableReference |
add(VariableReference left,
VariableReference right)
Creates an addition operation for the left and right arguments.
|
io.improbable.keanu.backend.keanu.compiled.WrappedCompiledGraph |
build() |
void |
connect(java.util.Map<? extends Vertex<?>,? extends Vertex<?>> connections) |
void |
create(Vertex visiting) |
void |
createConstant(Vertex visiting) |
void |
createVariable(Vertex visiting) |
java.util.Collection<VariableReference> |
getLatentVariables() |
java.lang.String |
getSource() |
void |
registerOutput(VariableReference output) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvert, convertpublic void createConstant(Vertex visiting)
createConstant in interface ComputableGraphBuilder<ComputableGraph>visiting - create this vertex as a constant in the computable graph that is being built.public void createVariable(Vertex visiting)
createVariable in interface ComputableGraphBuilder<ComputableGraph>visiting - create this vertex as a variable in the computable graph that is being built.public void create(Vertex visiting)
create in interface ComputableGraphBuilder<ComputableGraph>visiting - create this vertex in the compiled graph that is being built.public void registerOutput(VariableReference output)
registerOutput in interface ComputableGraphBuilder<ComputableGraph>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.public java.util.Collection<VariableReference> getLatentVariables()
getLatentVariables in interface ComputableGraphBuilder<ComputableGraph>public VariableReference add(VariableReference left, VariableReference right)
ComputableGraphBuilderadd in interface ComputableGraphBuilder<ComputableGraph>left - a variable reference to the left argright - a variable reference to the right argpublic void connect(java.util.Map<? extends Vertex<?>,? extends Vertex<?>> connections)
connect in interface ComputableGraphBuilder<ComputableGraph>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.public java.lang.String getSource()
public io.improbable.keanu.backend.keanu.compiled.WrappedCompiledGraph build()
build in interface ComputableGraphBuilder<ComputableGraph>