Package java.util

Examples of java.util.LinkedList.subList()


    new Support_ListTest("", ll).runTest();

    LinkedList subList = new LinkedList();
    for (int i = -50; i < 150; i++)
      subList.add(new Integer(i));
    new Support_ListTest("", subList.subList(50, 150)).runTest();
  }

  /**
   * @tests java.util.LinkedList#LinkedList(java.util.Collection)
   */
 
View Full Code Here


            // So in our case we are seraching for [b, a, c, d, b]
            final String label = ( String ) cycleStack.getFirst();

            final int pos = cycleStack.lastIndexOf( label );

            final List cycle = cycleStack.subList( 0, pos + 1 );

            Collections.reverse( cycle );

            return cycle;
        }
View Full Code Here

      for (int i = 0; i < sample.numInstances(); i++) {
  extraIndices.add(i);
      }
    }
    Collections.shuffle(extraIndices, rand);
    extraIndices = extraIndices.subList(0, extraIndicesCount);
    Set extraIndexSet = new HashSet(extraIndices);

    // the main loop to handle computing nearest neighbors and generating SMOTE
    // examples from each instance in the original minority class data
    Instance[] nnArray = new Instance[nearestNeighbors];
View Full Code Here

            // So in our case we are seraching for [b, a, c, d, b]
            final String label = (String) cycleStack.getFirst();

            final int pos = cycleStack.lastIndexOf( label );

            final List cycle = cycleStack.subList( 0, pos + 1 );

            Collections.reverse( cycle );

            return cycle;
        }
View Full Code Here

         Collections.sort(uf, new UserEntryComparator());

         if (offset + limit <= size)
         {
            return processUsers(uf.subList(offset, offset + limit));
         }
         else if (offset >= size)
         {
            return new HashSet();
         }
View Full Code Here

         else if (offset >= size)
         {
            return new HashSet();
         }

         return processUsers(uf.subList(offset, size));
      }
      catch (NoSuchElementException e)
      {
         log.debug("No users found", e);
      }
View Full Code Here

         Collections.sort(uf, new UserEntryComparator());

         if (offset + limit <= size)
         {
            return processUsers(uf.subList(offset, offset + limit));
         }
         else if (offset >= size)
         {
            return new HashSet();
         }
View Full Code Here

         else if (offset >= size)
         {
            return new HashSet();
         }

         return processUsers(uf.subList(offset, size));
      }
      catch (NoSuchElementException e)
      {
         log.debug("No users found", e);
      }
View Full Code Here

         Collections.sort(uf, new UserEntryComparator());

         if (offset + limit <= size)
         {
            return processUsers(uf.subList(offset, offset + limit));
         }
         else if (offset >= size)
         {
            return new HashSet();
         }
View Full Code Here

         else if (offset >= size)
         {
            return new HashSet();
         }

         return processUsers(uf.subList(offset, size));
      }
      catch (NoSuchElementException e)
      {
         log.debug("No users found", e);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.