weka.classifiers.m5
Class Ivector

java.lang.Object
  |
  +--weka.classifiers.m5.Ivector

public final class Ivector
extends java.lang.Object

Class for handling integer vector

Author:
Yong Wang (yongwang@cs.waikato.ac.nz)

Constructor Summary
Ivector()
           
 
Method Summary
static int[] combine(int[] list1, int[] list2)
          Outputs a new integer vector which contains all the values in two integer vectors; assuming list1 and list2 are incrementally sorted and no identical integers within each integer vector
static int[] copy(int[] a, int n)
          Makes a copy of the first n elements in an integer vector
static java.lang.String toString(int[] a, int first, int last)
          Converts a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ivector

public Ivector()
Method Detail

toString

public static final java.lang.String toString(int[] a,
                                              int first,
                                              int last)
Converts a string
Parameters:
a - an integer vector
first - the index of the first element needed printing in a[]
last - the index of the last element needed printing in a[]
Returns:
the converted string

copy

public static final int[] copy(int[] a,
                               int n)
Makes a copy of the first n elements in an integer vector
Parameters:
a - an integer vector
n - the number of elemented needed copying
Returns:
the copy of the integer vector

combine

public static final int[] combine(int[] list1,
                                  int[] list2)
Outputs a new integer vector which contains all the values in two integer vectors; assuming list1 and list2 are incrementally sorted and no identical integers within each integer vector
Parameters:
list1 - integer vector 1
list2 - integer vector 2 Input: list1,list2
Returns:
the new integer vector