|
Imports BV.Core
Imports BV.Math
Imports IMidRange
Imports System.Drawing
'Calc
'29/7/04
Public Class ParallelSystemCalc
Inherits BasicSystemCalc
Public Sub New(ByVal fn As ICalcU)
MyBase.New(fn)
End Sub
Public ReadOnly Property DataCount() As Long
Get
Return intdata.GetUpperBound(0)
End Get
End Property
#Region "In Methods"
Public Overrides Function [In](ByVal o As Object) As Boolean
If TypeOf o Is Single() Then
InputParallel(CType(o, Single()))
ElseIf TypeOf o Is PointF() Then
InputParallel(CType(o, PointF()))
ElseIf TypeOf o Is PointC() Then
InputParallel(CType(o, PointC()))
Else
If MessageManager.Send(Me, New MessageEventArgs("Unsuported Input Type", MessageEventArgs.EMessageType.Error)) Then
Stop
End If
Exit Function
End If
RaiseDataChanged(Me, New EventArgs)
End Function
Protected Overridable Sub InputParallel(ByVal s() As Single)
Dim i As Integer
Dim PC() As PointF
ReDim PC(s.GetUpperBound(0))
Do While i < s.GetUpperBound(0)
PC(i) = New PointF(i, s(i))
i = i + 1
Loop
intdata = PC
End Sub
Protected Overridable Sub InputParallel(ByVal c() As ComplexUndefinied) 'Implements IInputCalcCU.In
Me.intdata = c
End Sub
Protected Overridable Sub InputParallel(ByVal p() As PointF) 'Implements IInputCalcXY.In
Me.intdata = p
End Sub
Protected Overridable Sub InputParallel(ByVal PC() As PointC) 'Implements IInputParallelXY.In
Me.intdata = PC
End Sub
#End Region
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.