C# Class Algorithmix.MatchData

Datei anzeigen Open project: Algorithmix/Papyrus Class Usage Examples

Public Properties

Property Type Description
ChamferScan double[]
ChamferSimilarity double
First Side
NORMALIZATION_ENABLED bool
ORIENTATION_PENALTY bool
Offset int
Second Side

Public Methods

Method Description
ClusterNodes ( MatchData matchData ) : Cluster

This Method ensures a match is possible and if so clusters two nodes

CompareShred ( Shred first, Shred second, Direction directionA, Orientation orientationA, Direction directionB, Orientation orientationB ) : MatchData

Given two shreds, calculate the offset value at which the two shreds are most similar

ForceClusterNodes ( MatchData matchData, Match match = Match.NonInverted ) : Cluster

This Method clusters two nodes forcibly with no match

MatchData ( double chamferSimilarity, int offset, double scan, Side first, Side second ) : System

Creates a MatchData Object for encapsulating all the comparison MatchData

SmartClusterNodes ( MatchData matchData ) : INode

Private Methods

Method Description
IsFit ( INode root, Shred shred, Side side ) : Direction>.Tuple

IsFit checks if given a specified side, it can be fit with a shreds's edge This Also returns a match object

IsMatch ( MatchData matchData, INode firstRoot, INode secondRoot ) : ClusterData

IsMatch determines if two shreds can be placed next to each other and thus matched. It returns a match.inverted or match.noninverted if possible or match.impossible if not. You shouldn't need to call IsMatch, rather use the safe ClusterNodes() method which will do it for you

Method Details

ClusterNodes() public static method

This Method ensures a match is possible and if so clusters two nodes
public static ClusterNodes ( MatchData matchData ) : Cluster
matchData MatchData MatchData Object
return Cluster

CompareShred() public static method

Given two shreds, calculate the offset value at which the two shreds are most similar
public static CompareShred ( Shred first, Shred second, Direction directionA, Orientation orientationA, Direction directionB, Orientation orientationB ) : MatchData
first Shred The first shred staged for comparison
second Shred The other shred staged for comparison
directionA Direction Direction of this shred to be compared
orientationA Orientation Orientation of this shred to be compared
directionB Direction Direction of the other shred to be compared
orientationB Orientation Orientiation of the other shred to be compared
return MatchData

ForceClusterNodes() public static method

This Method clusters two nodes forcibly with no match
public static ForceClusterNodes ( MatchData matchData, Match match = Match.NonInverted ) : Cluster
matchData MatchData MatchData Object
match Match Indicates how the MatchData is Matched
return Cluster

MatchData() public method

Creates a MatchData Object for encapsulating all the comparison MatchData
public MatchData ( double chamferSimilarity, int offset, double scan, Side first, Side second ) : System
chamferSimilarity double
offset int
scan double
first Side
second Side
return System

SmartClusterNodes() public static method

public static SmartClusterNodes ( MatchData matchData ) : INode
matchData MatchData
return INode

Property Details

ChamferScan public_oe property

public double[] ChamferScan
return double[]

ChamferSimilarity public_oe property

public double ChamferSimilarity
return double

First public_oe property

public Side,Algorithmix First
return Side

NORMALIZATION_ENABLED public_oe static_oe property

public static bool NORMALIZATION_ENABLED
return bool

ORIENTATION_PENALTY public_oe static_oe property

public static bool ORIENTATION_PENALTY
return bool

Offset public_oe property

public int Offset
return int

Second public_oe property

public Side,Algorithmix Second
return Side