Packagecom.asterisq.graph.views
Classpublic class MaxNeighborsGraphView
InheritanceMaxNeighborsGraphView Inheritance SynchronizedGraphView Inheritance flash.events.EventDispatcher
ImplementsIGraphView

A view which limits the number of edges any node can have. This view only removes edges from the view calculation.

Nodes with more edges are dealt with first. Edges connecting nodes with the most neighbors are removed first if the number of neighbors is above the limit.

If a node with too many connections has no neighbors that are above the edge limit, connections to neighbors with the fewest edges are removed. This is done to preserve as much data as possible.



Public Properties
 PropertyDefined by
 InheritedautomaticViewInvalidation : Boolean
Indicates whether the view is automatically invalidated when the model changes.
SynchronizedGraphView
  maxNeighbors : int
The maximum number of neighbors allowed for each node in the view.
MaxNeighborsGraphView
 Inheritedmodel : IGraph
The model from which the contents of this view is calculated.
SynchronizedGraphView
  protectedNodeIDs : Array
IDs of nodes that should never be removed.
MaxNeighborsGraphView
 Inheritedview : IGraph
The calculated contents of this view.
SynchronizedGraphView
 InheritedviewInvalid : Boolean
Indicates whether the view is currently invalid.
SynchronizedGraphView
Public Methods
 MethodDefined by
  
Creates a new MaxNeighborsGraphView.
MaxNeighborsGraphView
 Inherited
invalidate():void
Schedules the view for validation during the next render cycle.
SynchronizedGraphView
 Inherited
validateNow():void
Immediately recalculates the view.
SynchronizedGraphView
Protected Methods
 MethodDefined by
  
validate():Boolean
Recalculates the contents of the view from the model data.
MaxNeighborsGraphView
Property detail
maxNeighborsproperty
maxNeighbors:int  [read-write]

The maximum number of neighbors allowed for each node in the view. The default is 10.

Implementation
    public function get maxNeighbors():int
    public function set maxNeighbors(value:int):void
protectedNodeIDsproperty 
protectedNodeIDs:Array  [read-write]

IDs of nodes that should never be removed. These nodes will always be included in the view, even if it breaks the maximum neighbors limit.

Implementation
    public function get protectedNodeIDs():Array
    public function set protectedNodeIDs(value:Array):void
Constructor detail
MaxNeighborsGraphView()constructor
public function MaxNeighborsGraphView()

Creates a new MaxNeighborsGraphView.

Method detail
validate()method
protected override function validate():Boolean

Recalculates the contents of the view from the model data.

Returns
Boolean