openalea.core.algo package#
Submodules#
openalea.core.algo.dataflow_copy module#
This module provide an algorithm to create a factory from an instance of a dataflow
- openalea.core.algo.dataflow_copy.structural_copy(dataflow_pattern, dataflow_copy)[source]#
make a copy of dataflow_pattern into dataflow_copy
copy only structural informations and not informations related to vertices like actors
- Parameters:
dataflow_pattern – the pattern to copy
dataflow_copy – the destination
openalea.core.algo.dataflow_evaluation module#
This module provide an algorithm to evaluate a dataflow
- class openalea.core.algo.dataflow_evaluation.AbstractEvaluation(dataflow)[source]#
Bases:
object- eval_vertex_code(vid)[source]#
Evaluate the vertex vid. Can raise an exception if evaluation failed.
- class openalea.core.algo.dataflow_evaluation.BrutEvaluation(dataflow)[source]#
Bases:
AbstractEvaluationBasic evaluation algorithm
- openalea.core.algo.dataflow_evaluation.DefaultEvaluation#
alias of
LambdaEvaluation
- class openalea.core.algo.dataflow_evaluation.DiscreteTimeEvaluation(dataflow)[source]#
Bases:
AbstractEvaluationEvaluation algorithm with generator / priority and selection
- exception openalea.core.algo.dataflow_evaluation.EvaluationException(vid, node, exception, exc_info)[source]#
Bases:
Exception
- class openalea.core.algo.dataflow_evaluation.GeneratorEvaluation(dataflow)[source]#
Bases:
AbstractEvaluationEvaluation algorithm with generator / priority and selection
- class openalea.core.algo.dataflow_evaluation.LambdaEvaluation(dataflow)[source]#
Bases:
PriorityEvaluationEvaluation algorithm with support of lambda / priority and selection
- eval(vtx_id=None, context=None, is_subdataflow=False, step=False)[source]#
Eval the dataflow from vtx_id with a particular context
- Parameters:
vtx_id – vertex id to start the evaluation
context – list a value to assign to lambda variables
- eval_vertex(vid, context, lambda_value, *args)[source]#
Evaluate the vertex vid
This function is called both by the user (eval a node and its parents) and by the SubDataFlow evaluation.
First the graph is traversed by the algorithm in a bottom-up way. The SubDataflow is stored in the inputs.
- Parameters:
context – is a list a value to assign to lambdas
- class openalea.core.algo.dataflow_evaluation.PrintProvenance(workflow)[source]#
Bases:
Provenance
- class openalea.core.algo.dataflow_evaluation.PriorityEvaluation(dataflow)[source]#
Bases:
BrutEvaluationSupport priority between nodes and selective
- class openalea.core.algo.dataflow_evaluation.SciFlowareEvaluation(dataflow)[source]#
Bases:
AbstractEvaluationDistributed Evaluation algorithm with SciFloware backend
- eval_vertex(vid)[source]#
Evaluate the vertex vid
This evaluation is both a kind of compilation and real evaluation. Algorithm ——— For each vertex which is a SciFloware operator (e.g. map, reduce, …),
select the vertices connected to each input port
- if the name of the port is Dataflow:
get its name and send it as input to the operator
- else
normal evaluation
- class openalea.core.algo.dataflow_evaluation.ToScriptEvaluation(dataflow)[source]#
Bases:
AbstractEvaluationBasic transformation into script algorithm
- openalea.core.algo.dataflow_evaluation.cmp(x, y)[source]#
Replacement for built-in function cmp that was removed in Python 3
Compare the two objects x and y and return an integer according to the outcome. The return value is negative if x < y, zero if x == y and strictly positive if x > y.