|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcommon.ReferenceHistogramPair
public class ReferenceHistogramPair
Represents the partitions of two sets of references, called the foreground set and the background set. There are methods for moving a reference from one set to another; the foreground and background histograms are both updated, so that the total number of references referring to each object always remains the same. There are also methods for getting the foreground and background histograms, which implement the ReferenceHistogram interface and are backed by the ReferenceHistogramPair object. A ReferenceHistogramPair object does not maintain two separate histograms explicitly. Instead, it starts with one master histogram representing the full set of references. It represents the foreground histogram explicitly, and represents the background histogram implicitly as the difference between the master and foreground histograms. The point is that we don't have to explicitly construct the background histogram, which may be quite large. The master histogram is never changed.
Constructor Summary | |
---|---|
ReferenceHistogramPair(ReferenceHistogram master)
Creates a new ReferenceHistogramPair with this given master histogram, where all citations are initially in the background set. |
Method Summary | |
---|---|
ReferenceHistogram |
getBackgroundHistogram()
Returns a ReferenceHistogram object for the background set. |
ReferenceHistogram |
getForegroundHistogram()
Returns a ReferenceHistogram object for the foreground set. |
void |
moveToBackground(java.lang.Long obj)
Moves one reference referring to the given object from the foreground to the background. |
void |
moveToForeground(java.lang.Long obj)
Moves one reference referring to the given object from the background to the foreground. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReferenceHistogramPair(ReferenceHistogram master)
Method Detail |
---|
public void moveToForeground(java.lang.Long obj)
obj
- the ID of the object referred to by the reference
being movedpublic void moveToBackground(java.lang.Long obj)
obj
- the ID of the object referred to by the reference
being moved.public ReferenceHistogram getForegroundHistogram()
public ReferenceHistogram getBackgroundHistogram()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |