StageTVertex, TTime Constructor Naiad Help

[This is preliminary documentation and is subject to change.]

Constructs a new stage in the given time context, using the given vertex factory to construct the constituent vertices.

Namespace: Microsoft.Research.Naiad.Dataflow
Assembly: Microsoft.Research.Naiad (in Microsoft.Research.Naiad.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax

C#
public Stage(
	TimeContext<TTime> context,
	Func<int, Stage<TTime>, TVertex> factory,
	string name
)

Parameters

context
Type: Microsoft.Research.Naiad.DataflowTimeContextTTime
The time context.
factory
Type: SystemFuncInt32, StageTTime, TVertex
A factory for vertices in this stage.
name
Type: SystemString
A human-readable name for this stage.
Examples

To use this constructor, the programmer must pass a vertex factory, which is a function from an integer ID and stage to the vertex type (TVertex). The factory arguments must be passed through to the VertexTTime(Int32, StageTTime) constructor. For example:
class MyVertex : Vertex<TTime> where TTime : Time<TTime>
{
    public MyVertex(int id, Stage<TTime> stage, ...)
        : base(id, stage)
    {
        /* Other initialization. */
    }
}

var stage = new Stage<TTime, MyVertex>(context, (i, s) => new MyVertex(i, s, ...), "MyStage");
See Also

Reference