Beispiel #1
0
        protected TCluster ConvertCluster <TCluster>(ItemCluster <T> c) where TCluster : ItemCluster <T>, new()
        {
            TCluster output = new TCluster();

            output.name = c.name;

            output.ClusterSeed = c.ClusterSeed;
            foreach (T item in c.items)
            {
                if (c.scoreDictionary.ContainsKey(item))
                {
                    output.Add(item, c.scoreDictionary[item]);
                }
                else
                {
                    //output.Add(item, )
                }
            }
            return(output);
        }
Beispiel #2
0
 public virtual void AddCluster(ItemCluster <T> input)
 {
     Clusters.Add(input);
 }