edu.isi.stella
Class TaxonomyGraph

java.lang.Object
  extended by edu.isi.stella.Stella_Object
      extended by edu.isi.stella.StandardObject
          extended by edu.isi.stella.TaxonomyGraph

public class TaxonomyGraph
extends StandardObject


Field Summary
 List addedLinks
           
 List brokenLinks
           
 boolean incrementalModeP
           
 int largestPostorderNumber
           
 int numberOfForeignIntervalNodes
           
 int numberOfNodes
           
 List removedLinks
           
 boolean renumberIfOutOfNumbersP
          If TRUE, relabel the entire graph when a new interval for an incrementally inserted node can't be allocated due to lack of splittable interval space.
 double renumberRatio
          Whenever the ratio between foreign intervals and non-foreign intervals becomes greater than renumberRatio, relabel the whole graph non-incrementally.
 List roots
           
 
Constructor Summary
TaxonomyGraph()
           
 
Method Summary
static Stella_Object accessTaxonomyGraphSlotValue(TaxonomyGraph self, Symbol slotname, Stella_Object value, boolean setvalueP)
           
static void addTaxonomyNode(TaxonomyGraph graph, TaxonomyNode node, boolean rootP)
          Add node to graph.
static void addTaxonomyRoot(TaxonomyGraph graph, TaxonomyNode root)
          Add root as a root node to graph.
static Iterator allTaxonomyNodes(TaxonomyGraph graph)
          Given a taxonomy graph that has been finalized, return an iterator that generates all the graph's nodes.
static void clearTaxonomyGraph(TaxonomyGraph graph)
          Clear all taxonomy-graph-specific information of graph, but retain information about the native network and associated links.
static Interval createNextPostorderInterval(TaxonomyGraph graph)
           
static void createTaxonomyLink(TaxonomyGraph graph, TaxonomyNode parent, TaxonomyNode child)
           
static TaxonomyNode createTaxonomyNode(TaxonomyGraph graph, TaxonomyNode node, Stella_Object nativeobject, boolean rootP)
          Link the taxonomy node node to nativeobject and add it to graph.
static void createTaxonomySpanningForest(TaxonomyGraph graph)
           
static void createTaxonomySpanningTree(TaxonomyGraph graph, TaxonomyNode node)
           
static void createTaxonomyTreeIntervals(TaxonomyGraph graph)
           
static void finalizeTaxonomyGraph(TaxonomyGraph graph)
          Finalize the taxonomy graph graph.
static void finalizeTaxonomyGraphNonincrementally(TaxonomyGraph graph)
           
static TaxonomyNode findTaxonomyNode(TaxonomyGraph graph, int label)
          Return some node in graph with label label.
static void incrementallyLinkTaxonomyNodes(TaxonomyGraph graph, TaxonomyNode parent, TaxonomyNode child)
           
static void incrementallyUnlinkTaxonomyNodes(TaxonomyGraph graph, TaxonomyNode parent, TaxonomyNode child)
           
static void initializeTaxonomyGraph(TaxonomyGraph graph)
          Completely clear the taxonomy graph graph.
static void linkTaxonomyNodes(TaxonomyGraph graph, TaxonomyNode parent, TaxonomyNode child)
          Cross-link parent and child in graph.
static TaxonomyGraph newTaxonomyGraph()
           
 Surrogate primaryType()
          Returns the primary type of self.
 void printObject(java.io.PrintStream stream)
           
static void printTaxonomyGraph(TaxonomyGraph graph, OutputStream stream)
           
static void printTaxonomySpanningForest(TaxonomyGraph graph, OutputStream stream)
           
static void removeTaxonomyNode(TaxonomyGraph graph, TaxonomyNode node)
          Remove node from graph and disconnect incident links.
static void removeTaxonomyRoot(TaxonomyGraph graph, TaxonomyNode root)
          Remove root from graphs root nodes.
static void unlinkTaxonomyNodes(TaxonomyGraph graph, TaxonomyNode parent, TaxonomyNode child)
          Remove link between parent and child.
static void updateTaxonomyRoots(TaxonomyGraph graph, TaxonomyNode node)
          Update graphs roots according to nodes current state.
 
Methods inherited from class edu.isi.stella.StandardObject
arrayTypeSpecifierP, baseTypeToTypeSpec, cantOverwriteActiveCollectionSlot, compatibleParameterTypesP, computeAnchoredTypeSpec, computeRelativeTypeSpec, conformingTypeSpecP, copyWrappedLiteral, cppNonPointerTypeP, cppReferenceTypeP, cppReferencizeType, cppTranslateAndPointerizeTypeSpec, cppTranslateAndReferencizeTypeSpec, cppTranslateTypeSpec, cppTypeWithoutInteriorPointersP, dropSlotValue, extractParameterType, extractRequiredArgumentValues, getSlot, hashCode_, idlTranslateTypeSpec, inverseSlotDemon, javaLiteralP, javaNativeLiteralWrapperNames, javaSpecialSetterName, javaTranslateArrayOfTypeSpec, javaTranslateTypeSpec, javaTranslateTypeSpecForFunction, javaTranslateTypeSpecHelper, javaYieldClassObjectArrayExpression, javaYieldClassObjectExpression, javaYieldFullyQualifiedTypeName, javaYieldTranslatedClassAndMethodNames, listifyTypeSpec, lookupClTypeFromStellaType, objectEqlP, putSlotValue, readSlotValue, runConstructorDemons, runDestructorDemons, runSlotDemons, runSlotGuardDemonsP, standardObjectP, subTypeSpecOfP, twoArgumentLeastCommonSupertype, typeSpecToBaseType, typeSpecToClass, typeToWalkedNullValueTree, validateTypeSpecifier, voidP, walkTypeSpecIsNativeTypeP, writeSlotValue, yieldTypeSpecTree
 
Methods inherited from class edu.isi.stella.Stella_Object
_, accessInContext, addPropertyValue, amPm, anchoredTypeSpecifierP, andOrNotTreeP, applyCoercionMethod, atomicExpressionP, bindToSurrogateP, booleanP, bootstrapIsaP, bquotify, cast, characterP, chooseSortPredicate, clConditionalizeTypeDeclarationTree, clTranslateAtomicTree, clTranslateATree, clTranslateBooleanTest, clTranslatePlainBooleanTest, clTranslateVerbatimBodySymbols, clYieldTypedExpressionTree, coerceATree, coerceEvaluatedTree, coerceMvTree, coerceOptionValue, coerceToBoolean, coerceToFloat, coerceToHashSet, coerceToModule, coerceToModuleName, coerceToString, coerceToSymbol, coerceToXmlElement, coerceValueToBoolean, coerceValueToFloat, coerceValueToString, coerceValueToType, coercibleP, collectFeatureList, collectKeyValueList, commonLispSymbolP, computeExpressionType, consify, consifyListsAndIterators, consP, consTreeMatchP, convertToLiteral, copyConsTree, cppArgumentIsStreamP, cppBinaryOperatorP, cppBlockP, cppMaybeOutputStatementWithParentheses, cppOperatorP, cppOutputAtomicExpression, cppOutputLiteral, cppOutputOneActualParameter, cppOutputStatement, cppOutputTypedEntity, cppPrognifyStatement, cppPrognP, cppStatementToList, cppStreamIsStandardOutputP, cpptrans, cppTranslateAtomicTree, cppTranslateATree, cppTranslatedArrayTypeP, csValueP, dateDivider, dateTimeDivider, day, dealWithAmPm, dealWithEra, dealWithNoonMidn, decrementReferenceCount, defaultOptionHandler, defineSystem, defmodule, deletedP, describe, describeObject, describeTersely, destructureMethodNameTree, deUglifyParseTree, either, eqlP, eqlToBooleanP, eqlToCharacterP, eqlToFloatP, eqlToIntegerP, eqlToLongIntegerP, eqlToStringP, equalConsTreesP, equalHashCode, equalP, era, estimatedEvaluationCost, evaluate, evaluateArgumentTree, evaluateAtomicTree, evaluateCommand, expandBquoteTree, filterModuleP, floatP, free, get, getObject, getProperty, hashlist, hashMemoizedArguments, helpBquotify, helpClTranslateATree, helpCoerceATree, helpLptrans, helpPrintOutline, helpTransformBooleanProceduralExpression, helpWalkATree, homeModule, hour, idlOutputAtomicExpression, idlOutputLiteral, idlOutputStatement, idlTranslateAtomicTree, idlTranslateATree, illegalTreeP, implodePathname, incrementallyTranslate, incrementReferenceCount, inlineUnwrapBoolean, inlineWrapBoolean, inModule, integerP, isaP, javaBinaryOperatorP, javaBlockP, javaEndOfLineTokenP, javaHelpOutputPrintStream, javaMaybeOutputStatementWithParentheses, javaOperatorP, javaOutputLiteral, javaOutputStatement, javaPrognP, javaStreamIsStandardOutputP, javaSymbolCaseP, javaTranslateAtomicTree, javaTranslateATree, javaTranslateWithNativeWrapper, jptrans, keywordP, legalTokenizerFromStateP, legalTokenizerStateP, legalTokenizerToStateP, literalEqlP, logLevelLE, longIntegerP, lptrans, makeEvaluatableBquoteTree, makeFileNameFromRelativePath, makeMemoizedValueEntry, makeMemoizedValueEntryn, matchConsTree, methodSlotP, minute, month, nameToString, nilP, noonMidn, numberWrapperToFloat, objectEqualP, objectHashCode, one, oneI, onlyIf, parametricTypeSpecifierP, parseArrayDimensionsSpec, parseOptions, parseTokenizerCharacterSpec, parseTokenizerStateModifiers, permanentCopy, permanentify, permanentifyForm, po, prettyPrintLiteral, primaryClass, printOutline, printStellaCode, printStellaDefinition, printUndefinedSuperClasses, proceduralExpressionP, ptrans, publicSlots, registerRecycledItem, runOptionHandlerP, safeEqualHashCode, safeHashCode, safePrimaryType, safeYieldTypeSpecifier, searchConsTreeP, searchConsTreeWithFilterP, searchForObject, secondp, setProperty, sideEffectFreeExpressionP, simplifyBquoteTree, specialp, stella_Increment, stellaClassP, stellaCollectionP, stellaNeedToCompileP, stellaNeedToTranslateP, stellaObjectP, stellify, storageSlotP, stringifyInModule, stringP, substituteConsTree, substituteOnce, surrogateP, surrogatify, sweep, symbolCaseP, symbolP, sysTree, targetLanguageType, taxonomyIsaP, timeDivider, timeMultiply, tokenizerIncludeSpecP, tokenizerToStateAlias, tokenizerToStateName, toString, traceIf, traceKeywordP, transientifyForm, transientObjectP, transientSymbolP, translateWalkedTree, treeSize, treeToTrees, trueOptionP, tryToEvaluate, typeP, typify, unmake, unregisterRecycledItem, updateInContext, valuesTreeP, variableExpressionP, verbatimStringP, verbatimTreeP, vetOptions, vrletExpressionP, walkAtomicTree, walkATree, walkCollectionTree, walkDontCallMeTree, walkedExpressionExpression, walkedExpressionType, walkExpressionTree, walkMvExpressionTree, walkMvTree, walkStatement, walkTopLevelExpression, walkWithoutTypeTree, warnAboutUnknownSourceType, weekday, withinContext, withinModule, withinWorld, withStellaTokenizer, withSystemDefinition, withTokenizer, wrapperP, wrapWhereTest, xmlAttributeP, xmlBaseAttributeP, xmlCdataFormP, xmlCdataP, xmlDeclarationFormP, xmlDeclarationP, xmlDoctypeFormP, xmlElementFormP, xmlElementP, xmlGlobalAttributeP, xmlLocalAttributeP, xmlnsAttributeP, xmlProcessingInstructionFormP, xmlProcessingInstructionP, xmlTagCase, year, yieldCondTest, yieldCondTestOrTests, yieldHardcodedCaseSymbolIdOrIds, yieldInCursorClausesForArgumentList, yieldInCursorClausesForGeneralCollection, yieldInCursorClausesForVector, yieldTypeSpecifier, zone, zoneMinute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

renumberIfOutOfNumbersP

public boolean renumberIfOutOfNumbersP
If TRUE, relabel the entire graph when a new interval for an incrementally inserted node can't be allocated due to lack of splittable interval space. Otherwise, create a foreign interval and propagate it.


renumberRatio

public double renumberRatio
Whenever the ratio between foreign intervals and non-foreign intervals becomes greater than renumberRatio, relabel the whole graph non-incrementally.


incrementalModeP

public boolean incrementalModeP

largestPostorderNumber

public int largestPostorderNumber

numberOfNodes

public int numberOfNodes

numberOfForeignIntervalNodes

public int numberOfForeignIntervalNodes

roots

public List roots

brokenLinks

public List brokenLinks

addedLinks

public List addedLinks

removedLinks

public List removedLinks
Constructor Detail

TaxonomyGraph

public TaxonomyGraph()
Method Detail

newTaxonomyGraph

public static TaxonomyGraph newTaxonomyGraph()

printTaxonomySpanningForest

public static void printTaxonomySpanningForest(TaxonomyGraph graph,
                                               OutputStream stream)

printTaxonomyGraph

public static void printTaxonomyGraph(TaxonomyGraph graph,
                                      OutputStream stream)

finalizeTaxonomyGraphNonincrementally

public static void finalizeTaxonomyGraphNonincrementally(TaxonomyGraph graph)

finalizeTaxonomyGraph

public static void finalizeTaxonomyGraph(TaxonomyGraph graph)
Finalize the taxonomy graph graph.

Parameters:
graph -

createTaxonomySpanningForest

public static void createTaxonomySpanningForest(TaxonomyGraph graph)

createTaxonomySpanningTree

public static void createTaxonomySpanningTree(TaxonomyGraph graph,
                                              TaxonomyNode node)

createTaxonomyTreeIntervals

public static void createTaxonomyTreeIntervals(TaxonomyGraph graph)

initializeTaxonomyGraph

public static void initializeTaxonomyGraph(TaxonomyGraph graph)
Completely clear the taxonomy graph graph. NOTE: Any nodes associated with graph will not be cleared. If they are to be reused, they have to be cleared with initializeTaxonomyNode.

Parameters:
graph -

clearTaxonomyGraph

public static void clearTaxonomyGraph(TaxonomyGraph graph)
Clear all taxonomy-graph-specific information of graph, but retain information about the native network and associated links.

Parameters:
graph -

findTaxonomyNode

public static TaxonomyNode findTaxonomyNode(TaxonomyGraph graph,
                                            int label)
Return some node in graph with label label.

Parameters:
graph -
label -
Returns:
TaxonomyNode

allTaxonomyNodes

public static Iterator allTaxonomyNodes(TaxonomyGraph graph)
Given a taxonomy graph that has been finalized, return an iterator that generates all the graph's nodes.

Parameters:
graph -
Returns:
Iterator

incrementallyUnlinkTaxonomyNodes

public static void incrementallyUnlinkTaxonomyNodes(TaxonomyGraph graph,
                                                    TaxonomyNode parent,
                                                    TaxonomyNode child)

unlinkTaxonomyNodes

public static void unlinkTaxonomyNodes(TaxonomyGraph graph,
                                       TaxonomyNode parent,
                                       TaxonomyNode child)
Remove link between parent and child.

Parameters:
graph -
parent -
child -

createNextPostorderInterval

public static Interval createNextPostorderInterval(TaxonomyGraph graph)

incrementallyLinkTaxonomyNodes

public static void incrementallyLinkTaxonomyNodes(TaxonomyGraph graph,
                                                  TaxonomyNode parent,
                                                  TaxonomyNode child)

linkTaxonomyNodes

public static void linkTaxonomyNodes(TaxonomyGraph graph,
                                     TaxonomyNode parent,
                                     TaxonomyNode child)
Cross-link parent and child in graph. IMPORTANT: This will automatically insert a backlink from child to parent, so, for maximum efficiency it should not be called a second time with the arguments reversed.

Parameters:
graph -
parent -
child -

createTaxonomyLink

public static void createTaxonomyLink(TaxonomyGraph graph,
                                      TaxonomyNode parent,
                                      TaxonomyNode child)

removeTaxonomyNode

public static void removeTaxonomyNode(TaxonomyGraph graph,
                                      TaxonomyNode node)
Remove node from graph and disconnect incident links.

Parameters:
graph -
node -

addTaxonomyNode

public static void addTaxonomyNode(TaxonomyGraph graph,
                                   TaxonomyNode node,
                                   boolean rootP)
Add node to graph. Mark it as a root node if rootP is true. Even though this is part of the API, it should rarely be needed, since createTaxonomyNode does everything that's necessary.

Parameters:
graph -
node -
rootP -

createTaxonomyNode

public static TaxonomyNode createTaxonomyNode(TaxonomyGraph graph,
                                              TaxonomyNode node,
                                              Stella_Object nativeobject,
                                              boolean rootP)
Link the taxonomy node node to nativeobject and add it to graph. If it is null, a new node will be created. Mark it as a root node if rootP is true. Return the node.

Parameters:
graph -
node -
nativeobject -
rootP -
Returns:
TaxonomyNode

updateTaxonomyRoots

public static void updateTaxonomyRoots(TaxonomyGraph graph,
                                       TaxonomyNode node)
Update graphs roots according to nodes current state.

Parameters:
graph -
node -

removeTaxonomyRoot

public static void removeTaxonomyRoot(TaxonomyGraph graph,
                                      TaxonomyNode root)
Remove root from graphs root nodes.

Parameters:
graph -
root -

addTaxonomyRoot

public static void addTaxonomyRoot(TaxonomyGraph graph,
                                   TaxonomyNode root)
Add root as a root node to graph. Only do this if root does not have any parents and is not a graph root already.

Parameters:
graph -
root -

printObject

public void printObject(java.io.PrintStream stream)
Overrides:
printObject in class Stella_Object

accessTaxonomyGraphSlotValue

public static Stella_Object accessTaxonomyGraphSlotValue(TaxonomyGraph self,
                                                         Symbol slotname,
                                                         Stella_Object value,
                                                         boolean setvalueP)

primaryType

public Surrogate primaryType()
Description copied from class: Stella_Object
Returns the primary type of self. Gets defined automatically for every non-abstract subclass of OBJECT.

Overrides:
primaryType in class Stella_Object
Returns:
Surrogate