wie muss denn die Korrekte Definition eine Generischen TClusterList Liste
aussehen , mein Syntaxfehler aktuell : [dcc32 Error] Unit_TKmeans.pas(37): E2508 Type parameters not allowed on this type
Delphi-Quellcode:
/// <summary>
/// here it is just a simple pixel
/// </summary>
TClusterData = record
DrawingColor: TColor;
x,y : Integer;
end;
/// <summary>
/// here it is just a simple pixel , we store the complete image as a pixel list
/// </summary>
TRowData = TArray< TClusterData>;
/// <summary>
/// store the data now inside a cluster with a Centroid
/// </summary>
TCluster<T> = record
Center: TClusterData;
ClusterElements : TArray<T>;
end;
/// <summary>
/// the cluster list
/// </summary>
TClusterList<T> = TArray<TCluster<T>>;
/// <summary>
/// measure distance according to this function
/// </summary
TDistanceMetricfunction=reference to function(const A, B: TClusterData) : Double;