コード例 #1
0
 // Common Methods
 public void GetArrays()
 {
     intArgs    = IDT.getIntArgs();
     doubleArgs = IDT.getDoubleArgs();
     boolArgs   = IDT.getBoolArgs();
     objectArgs = IDT.getObjectArgs();
 }
コード例 #2
0
ファイル: NodeCluster.cs プロジェクト: Fishheadhaha/OlanderIA
 // Getting data
 public void GetAllData()
 {
     intArgs    = IDT.getIntArgs();
     doubleArgs = IDT.getDoubleArgs();
     boolArgs   = IDT.getBoolArgs();
     if (Learning)
     {
         if (Loc)
         {
             objectArgs1 = IDT.getObjectArgs();
             Loc         = !Loc;
         }
         else
         {
             objectArgs2 = IDT.getObjectArgs();
             Loc         = !Loc;
         }
     }
     else
     {
         if (OpeningCalculation)
         {
             if (Loc)
             {
                 objectArgs1 = IDT.getObjectArgs();
                 if (objectArgs1.Length != 0)
                 {
                     BA  = new BitArray((objectArgs1[0]).Length);
                     Loc = !Loc;
                 }
                 else
                 {
                     BA = new BitArray(0);
                 }
             }
             else
             {
                 objectArgs2 = IDT.getObjectArgs();
                 if (objectArgs2.Length != 0)
                 {
                     BA  = new BitArray((objectArgs2[0]).Length);
                     Loc = !Loc;
                 }
                 else
                 {
                     BA = new BitArray(0);
                 }
             }
         }
         else
         {
             if (Loc)
             {
                 objectArgs1 = IDT.getObjectArgs();
                 if (objectArgs1.Length != 0)
                 {
                     BA  = new BitArray((objectArgs1[0]).Length);
                     Loc = !Loc;
                 }
                 else
                 {
                     BA = new BitArray(0);
                 }
             }
             else
             {
                 objectArgs2 = IDT.getObjectArgs();
                 if (objectArgs2.Length != 0)
                 {
                     BA  = new BitArray((objectArgs2[0]).Length);
                     Loc = !Loc;
                 }
                 else
                 {
                     BA = new BitArray(0);
                 }
             }
             for (int i = 0; i < BA.Length; i++)
             {
                 if (i < DataDivisions[0])
                 {
                     BA.Set(i, (double)objectArgs1[0][i] == (double)objectArgs2[0][i]);
                 }
                 else if (i < DataDivisions[1] + DataDivisions[0])
                 {
                     BA.Set(i, (bool)objectArgs1[0][i] == (bool)objectArgs2[0][i]);
                 }
                 else if (i < DataDivisions[2] + DataDivisions[1] + DataDivisions[0])
                 {
                     BA.Set(i, (int)objectArgs1[0][i] == (int)objectArgs2[0][i]);
                 }
             }
         }
     }
 }