Contents in this wiki are for entertainment purposes only
This is not fiction ∞ this is psience of mind

QAT Code: The Pairs Expansion Method

From Catcliffe Development
Revision as of 13:27, 13 July 2023 by XenoEngineer (talk | contribs)
Jump to navigation Jump to search

quasiArtifactualIntelligence —a perception from the edge

  About White paper QuasiMatrix Code QAT Code Data Examples Scatter-Gather Explained The Plow Share

The QAT Code —Category Pairs Expansion

The Warehouse if Pairs Expansion then Visual Scatter else Visual Cluster redim Bracketing Clusters while Event Chemistry wend SLIP class redim

The 'pair' is combined data values as a token, combined from two channels of time-synchronized data measurements


Public Function ExpandPairs() As Boolean
    ' Create the pair-combinations of all the Atoms that DO HAVE shared conjectural-regularity.
    
    Dim ndx         As Long
    Dim strField()  As String 'array
    Dim strPairs    As String
    Dim strJoin     As String
    Dim varX        As Variant
    
    '   Pairs format (Sorted):
    '   Atom1 ** Atom2 CR Atom3 ** Atom 4 CR, ...
   
    On Error GoTo trap
    
    If mtWh.State >= enumWhStates.ExtractedKeychains Then
        Set mtWh.colPairs = New Collection
        With New clsStopWatch
            If mtWh.State >= Loaded Then
                '   Create the paired-combinations of Atoms sharing Links.
                
                '   Enumerate atoms, creating a tabulation by string-concatenation
                '   of any new combinatrics joined from the array returned by the
                '   transform method producing combinatorics.
                RaiseEvent Progress("Pairs combination-expansion beginning...")
                ndx = 0
                For Each varX In mtWh.colAtomsKeychain
                    strJoin = Join(Combinatorics(varX), "**")
                    If Len(strJoin) Then
                        strPairs = Join(Array(strPairs, strJoin), Me.DataDelimRow) ' future: this needs checked for delay
                    End If
                    If ndx Mod 2 = 0 Then
                        RaiseEvent Progress("Expanding - (" & CStr(ndx) & ")...")
                        DoEvents
                    End If
                    ndx = ndx + 1
                Next
                RaiseEvent Console("Pairs expanded.  [" & CStr(.Elapsed) & " msec]")
                
                .Reset ' timer
                
                '   Store the Pairs tabular string data as a string array.
                mtWh.Pairs = Split(strPairs, Me.DataDelimRow)
                mtWh.PairsCount = UBound(mtWh.Pairs) + 1
                
                '   Sort the new Pairs array.
                QuickSortVariants mtWh.Pairs, 1, UBound(mtWh.Pairs), 1, UBound(mtWh.Pairs)
                RaiseEvent Console(CStr(mtWh.PairsCount) & " Pairs sorted.  [" & CStr(.Elapsed) & " msec]")
                RaiseEvent Progress("")
                
                mtWh.State = enumWhStates.ExpandedPairs
                ExpandPairs = True
                RaiseEvent Console(CStr(mtWh.PairsCount) & " Pairs expanded.  [" & CStr(.Elapsed) & " msec]")
                
            End If
        End With
    Else
        RaiseEvent Console("clsWhse.ExpandPairs: Failure: The Atoms Keychain has not been extracted.")
                
    End If ' mtWh.State >= enumWhStates.ExtractedKeychains
            
    Exit Function
ExitPoint:
    RaiseEvent Progress("")
Exit Function

trap:
    RaiseEvent Console("clsWhse.ExpandPairs: " & Err.Source & " Error(" & CStr(Err.Number) & "): '" & CStr(Err.Description) & "'")
    Resume ExitPoint
    Resume
End Function