| Package | flare.analytics.graph |
| Class | public class MaxFlowMinCut |
| Inheritance | MaxFlowMinCut Operator |
| Property | Defined by | ||
|---|---|---|---|
| edgeCapacity : Function A function defining the edge capacities for flow.
| MaxFlowMinCut | ||
![]() | enabled : Boolean Indicates if the operator is enabled or disabled.
| Operator | |
| flowField : String The property in which to store computed flow values.
| MaxFlowMinCut | ||
| maxFlow : Number [read-only] The computed maximum flow value.
| MaxFlowMinCut | ||
| mincutField : String The property in which to store minimum-cut data.
| MaxFlowMinCut | ||
![]() | parameters : Object
Sets parameter values for this operator.
| Operator | |
| sink : NodeSprite
The sink node for which to compute the max flow.
| MaxFlowMinCut | ||
| source : NodeSprite
The source node for which to compute the max flow.
| MaxFlowMinCut | ||
![]() | visualization : Visualization
The visualization processed by this operator.
| Operator | |
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new MaxFlowMinCut operator.
| MaxFlowMinCut | ||
![]() |
applyParameters(op:IOperator, params:Object):void
[static]
Static method that applies parameter settings to an operator.
| Operator | |
|
Calculates the maximum flow and minimum cut for the given data
| MaxFlowMinCut | ||
|
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
| MaxFlowMinCut | ||
![]() |
setup():void
Setup method invoked whenever this operator's visualization
property is set.
| Operator | |
| edgeCapacity | property |
edgeCapacity:Function [read-write]A function defining the edge capacities for flow. When setting this value, one can pass in either a Function, which should take an EdgeSprite as input and return a Number as output, or a String, in which case the string will be used as a property name from which to retrieve the edge capacity value from an EdgeSprite instance. If the value is null (the default) all edges will be assumed to have capacity 1.
NOTE: Capacities must be greater than or equal to zero!
Implementation public function get edgeCapacity():Function
public function set edgeCapacity(value:Function):void
| flowField | property |
flowField:String [read-write]The property in which to store computed flow values. This property is used to annotate edges with the computed flow. The default value is "props.flow".
Implementation public function get flowField():String
public function set flowField(value:String):void
| maxFlow | property |
maxFlow:Number [read-only]The computed maximum flow value. This value is zero by default and is populated once the max flow calculation is run.
Implementation public function get maxFlow():Number
| mincutField | property |
mincutField:String [read-write]The property in which to store minimum-cut data. The default value is "props.mincut". This property is used to annotate nodes with their partition (0 for source-side, 1 for sink-side) and to annotate edges with min-cut membership (true if part of the minimum cut, false otherwise).
Implementation public function get mincutField():String
public function set mincutField(value:String):void
| sink | property |
public var sink:NodeSpriteThe sink node for which to compute the max flow.
| source | property |
public var source:NodeSpriteThe source node for which to compute the max flow.
| MaxFlowMinCut | () | constructor |
public function MaxFlowMinCut(source:NodeSprite = null, sink:NodeSprite = null, edgeCapacity:* = null)Creates a new MaxFlowMinCut operator.
Parameterssource:NodeSprite (default = null) — the source node in the flow graph
|
|
sink:NodeSprite (default = null) — the sink node in the flow graph
|
|
edgeCapacity:* (default = null) — the edge capacity values. This can either be a
Function that returns capacity values or a
String providing the name of a property to look up on
EdgeSprite instances.
|
| calculate | () | method |
public function calculate(data:Data, s:NodeSprite, t:NodeSprite, c:Function = null):voidCalculates the maximum flow and minimum cut for the given data
Parametersdata:Data — the data set containing the flow graph
|
|
s:NodeSprite — the source node in the flow graph
|
|
t:NodeSprite — the target or "sink" node in the flow graph
|
|
c:Function (default = null) — a function returning capacity values for edges
|
| operate | () | method |
public override function operate(t:Transitioner = null):voidPerforms an operation over the contents of a visualization.
Parameterst:Transitioner (default = null) — a Transitioner instance for collecting value updates.
|