AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Generic TArray und TList ...

Ein Thema von bernhard_LA · begonnen am 5. Jan 2024 · letzter Beitrag vom 5. Jan 2024
 
bernhard_LA

Registriert seit: 8. Jun 2009
Ort: Bayern
1.124 Beiträge
 
Delphi 11 Alexandria
 
#1

Generic TArray und TList ...

  Alt 5. Jan 2024, 12:12
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;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:39 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz