示例#1
0
 public Root(string inputFile)
 {
     string[] attributes = TextMethod.LineToTable(inputFile, '\t', 0);
     if (Nodes == null)
     {
         Nodes = new List <Attribute>();
     }
     foreach (var atr in attributes)
     {
         Nodes.Add(new Attribute(atr));
     }
 }
 public Item(string line)
 {
     similarity = 0.0;
     string[] parameters = TextMethod.LineToTable(line, '\t');
     if (Parameters == null)
     {
         Parameters = new List <object>();
     }
     foreach (var p in parameters)
     {
         if (p.ToDouble() != null)
         {
             Parameters.Add(p.ToDouble());
         }
         else
         {
             Parameters.Add(p);
         }
     }
 }