コード例 #1
0
 /**
  * Gets an example.
  *
  * <p>This method is not thread safe. It always returns the same instance.
  *
  * @param pos Number of example
  * @return Array of example attributes in their default order
  */
 public SVMExample get_example(int pos) {
   x.att = atts[pos];
   x.index = index[pos];
   return x;
 }
コード例 #2
0
 /**
  * Gets an example. Returns a thread-local instance with value set according to the desired
  * position.
  *
  * <p>It always returns the same thread-local instance, so calling this method again in the same
  * thread will change the already acquired instance.
  *
  * @param pos Number of example
  * @return Array of example attributes in their default order
  */
 public SVMExample get_example(int pos) {
   SVMExample result = x.get();
   result.att = atts[pos];
   result.index = index[pos];
   return result;
 }