|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infomat.vectorspace.IObject infomat.vectorspace.IObjectGroup
public class IObjectGroup
A IObjectGroup is a set of IObject:s.
Nested Class Summary | |
---|---|
private class |
IObjectGroup.IObjectComparator
A private class that is used to order the IObjects. |
private class |
IObjectGroup.MapEntryComparator
A private class that is used to order the MapEntry:s. |
Field Summary | |
---|---|
static int |
maxIdSoFar
|
java.util.HashMap<IObject,java.lang.Integer> |
objectOrderIndexMap
|
(package private) java.util.HashMap<IObject,java.lang.Float> |
objectOrderValueMap
|
(package private) java.util.Vector<IObject> |
ordered
|
Constructor Summary | |
---|---|
|
IObjectGroup(IObjectGroup iog)
Copy constructor. |
|
IObjectGroup(java.lang.String name)
|
|
IObjectGroup(java.lang.String name,
int id)
|
protected |
IObjectGroup(java.lang.String name,
int kind,
int id)
Used by IObjectGrouping and IObjectSet. |
Method Summary | |
---|---|
void |
add(IObject co)
Adds a new IObject at the next place. |
void |
add(IObject co,
float orderValue)
Adds a new IObject in the place the value implicates. |
void |
addAll(IVector<IObject> ivec)
|
void |
addAll(java.util.Vector<IObject> iobjects)
Adds all the IObject:s at the end. |
boolean |
contains(IObject co)
Returns true when the IObjectGroup contains the IObject. |
boolean |
containsPrecisely(java.util.Vector<IObject> objs)
Returns true if the IObjectGroup contains these IObject:s and no other. |
IObject |
getIObjectAt(int i)
Returns the IObject at the i:the place according to the ordering. |
int |
getIObjectOrderIndex(IObject co)
Returns the order number of the IObject. |
IVector<IObject> |
getIVector()
|
java.lang.String |
getName()
Returns the name of thie IObjectGroup. |
java.util.HashMap<IObject,java.lang.Float> |
getObjectOrderValueMap()
Returns a HashMap with the objects mapped to the values that are the basis for the ordering. |
java.util.Vector<IObject> |
getOrdered()
Returns a vector of the ordered IObjects. |
java.util.Vector<java.util.Map.Entry<IObject,java.lang.Float>> |
getSortedObjectOrderValueVector()
Returns a sorted centroid vector |
IObjectGroup |
notIn(IObjectGroup group)
Returns a IObjectGroup with the IObject:s in this that is not in the specified IObjectGroup. |
int |
numberOfIObjects()
Returns the number of IObjects in the IObjectGroup. |
int |
numberOfSharedIObjects(IObjectGroup iog)
Returns the number of IObjects that are shared between the this and another IObjectGroup. |
void |
randomOrder()
Reorders the IObjects randomly. |
void |
remove(IObject co)
Removes the IObject. |
void |
remove(IVector<IObject> ivec)
|
void |
removeAll()
|
java.util.Vector<IObject> |
removeObjectsNotIn(IObjectGroup group)
Removes IObject:s that are not in the given IObjectGroup. |
void |
setIVector(IVector<IObject> vec)
Sets this group to contain the IObject:s in the specified IVector. |
void |
setName(java.lang.String name)
|
void |
sortInCurrentVectorOrderWithInvertedOrderNumberAsValue()
|
void |
sortInOrderValueOrder()
Sorts the IObjects in the vector "ordered" according to the values they have. |
IObjectGroup |
subGroup(int from,
int to)
|
IObjectGroup |
subGroup(IObject fromObject,
IObject toObject)
Returns the part of the group that starts with fromObject and ends with toObject, in the same order as this group. |
Methods inherited from class infomat.vectorspace.IObject |
---|
getAmbiguous, getAmbiguousString, getID, getKind, getLargestCommonLocation, getLocation, getString, setAmbiguous, setString, stringCompareTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int maxIdSoFar
java.util.Vector<IObject> ordered
public java.util.HashMap<IObject,java.lang.Integer> objectOrderIndexMap
java.util.HashMap<IObject,java.lang.Float> objectOrderValueMap
Constructor Detail |
---|
public IObjectGroup(java.lang.String name)
public IObjectGroup(java.lang.String name, int id)
protected IObjectGroup(java.lang.String name, int kind, int id)
public IObjectGroup(IObjectGroup iog)
Method Detail |
---|
public IObjectGroup subGroup(IObject fromObject, IObject toObject)
public IObjectGroup subGroup(int from, int to)
public void add(IObject co, float orderValue)
sortInOrderValueOrder()
.
public void add(IObject co)
public void addAll(java.util.Vector<IObject> iobjects)
public void addAll(IVector<IObject> ivec)
public void randomOrder()
public void remove(IObject co)
public void remove(IVector<IObject> ivec)
public void removeAll()
public java.util.Vector<IObject> removeObjectsNotIn(IObjectGroup group)
public IObjectGroup notIn(IObjectGroup group)
public boolean contains(IObject co)
public boolean containsPrecisely(java.util.Vector<IObject> objs)
public int numberOfIObjects()
public java.lang.String getName()
public void setName(java.lang.String name)
public IObject getIObjectAt(int i)
sortInOrderValueOrder()
public int getIObjectOrderIndex(IObject co)
sortInOrderValueOrder()
public java.util.Vector<IObject> getOrdered()
sortInOrderValueOrder()
public IVector<IObject> getIVector()
public void setIVector(IVector<IObject> vec)
public java.util.HashMap<IObject,java.lang.Float> getObjectOrderValueMap()
public java.util.Vector<java.util.Map.Entry<IObject,java.lang.Float>> getSortedObjectOrderValueVector()
public void sortInCurrentVectorOrderWithInvertedOrderNumberAsValue()
public void sortInOrderValueOrder()
public int numberOfSharedIObjects(IObjectGroup iog)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |