コード例 #1
0
 AskObject[] FetchObject(FetchQuery fetchQuery)
 {
     float[] centerPoint = fetchQuery.centerPoint;
     int targetId = fetchQuery.targetId;
     AskObject[] result=new AskObject[1];
     try {
         KdTreeNode<float, int>[] objects = KDTree.RadialSearch(centerPoint,4*maxRadius,100);
         for (int i=0;i<objects.Length;i++)
         {
             if(targetId==(idMap[objects[i].Value]).targetId)
             {
                 result[0]=idMap[objects[i].Value];
                 break;
             }
         }
     }
     catch (Exception e) {
         Console.WriteLine (e.StackTrace);
     }
     return result;
 }
コード例 #2
0
 public ObjectResult(AskObject _askObject, int qId)
 {
     askObject = _askObject;
      		queryId=qId;
 }