Package weka.attributeSelection
Class BestFirst.LinkedList2
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<BestFirst.Link2>
-
- weka.attributeSelection.BestFirst.LinkedList2
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<BestFirst.Link2>,java.util.Collection<BestFirst.Link2>,java.util.List<BestFirst.Link2>,java.util.RandomAccess
- Enclosing class:
- BestFirst
public class BestFirst.LinkedList2 extends java.util.ArrayList<BestFirst.Link2>
Class for handling a linked list. Used in best first search. Extends the Vector class.- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LinkedList2(int sz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToList(java.lang.Object[] data, double mer)adds an element (Link) to the list.BestFirst.Link2getLinkAt(int index)returns the element (Link) at a specific index from the list.java.lang.StringgetRevision()Returns the revision string.voidremoveLinkAt(int index)removes an element (Link) at a specific index from the list.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
removeLinkAt
public void removeLinkAt(int index) throws java.lang.Exceptionremoves an element (Link) at a specific index from the list.- Parameters:
index- the index of the element to be removed.- Throws:
java.lang.Exception
-
getLinkAt
public BestFirst.Link2 getLinkAt(int index) throws java.lang.Exception
returns the element (Link) at a specific index from the list.- Parameters:
index- the index of the element to be returned.- Throws:
java.lang.Exception
-
addToList
public void addToList(java.lang.Object[] data, double mer) throws java.lang.Exceptionadds an element (Link) to the list.- Parameters:
data- the attribute set specificationmer- the "merit" of this attribute set- Throws:
java.lang.Exception
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Returns:
- the revision
-
-