Class AlgorithmBase
Base class for all algorithm.
Inheritance
System.Object
AlgorithmBase
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GraphShape.Algorithms
Assembly: GraphShape.dll
Syntax
public abstract class AlgorithmBase : IAlgorithm
Properties
| Improve this Doc View SourceIsCancelling
Gets a value indicating if a cancellation request is pending.
Declaration
protected bool IsCancelling { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
State
Current computation state.
Declaration
public ComputationState State { get; }
Property Value
Type | Description |
---|---|
QuikGraph.Algorithms.ComputationState |
SyncRoot
Synchronizer object.
Declaration
public object SyncRoot { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
| Improve this Doc View SourceAbort()
Abort the computation.
Declaration
public void Abort()
Clean()
Called on algorithm cleanup step.
Declaration
protected virtual void Clean()
Compute()
Runs the computation.
Declaration
public void Compute()
Initialize()
Called on algorithm initialization step.
Declaration
protected virtual void Initialize()
InternalCompute()
Algorithm compute step.
Declaration
protected abstract void InternalCompute()
OnAborted(EventArgs)
Called on algorithm abort.
Declaration
protected virtual void OnAborted(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | args | EventArgs.Empty. |
OnFinished(EventArgs)
Called on algorithm finished.
Declaration
protected virtual void OnFinished(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | args | EventArgs.Empty. |
OnStarted(EventArgs)
Called on algorithm start.
Declaration
protected virtual void OnStarted(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | args | EventArgs.Empty. |
OnStateChanged(EventArgs)
Called on algorithm state changed.
Declaration
protected virtual void OnStateChanged(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | args | EventArgs.Empty. |
ThrowIfCancellationRequested()
Throws if a cancellation of the algorithm was requested.
Declaration
protected void ThrowIfCancellationRequested()
Exceptions
Type | Condition |
---|---|
System.OperationCanceledException | If the algorithm IsCancelling. |
Events
| Improve this Doc View SourceAborted
Fired when the computation is aborted.
Declaration
public event EventHandler Aborted
Event Type
Type | Description |
---|---|
System.EventHandler |
Finished
Fired when the computation is finished.
Declaration
public event EventHandler Finished
Event Type
Type | Description |
---|---|
System.EventHandler |
Started
Fired when the computation start.
Declaration
public event EventHandler Started
Event Type
Type | Description |
---|---|
System.EventHandler |
StateChanged
Fired when the computation state changed.
Declaration
public event EventHandler StateChanged
Event Type
Type | Description |
---|---|
System.EventHandler |