Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.chisel.cleaners
Class KeyValueRemover  view KeyValueRemover download KeyValueRemover.java

java.lang.Object
  extended bycom.trapezium.chisel.Optimizer
      extended bycom.trapezium.chisel.cleaners.InterpolatorMinimizer
          extended bycom.trapezium.chisel.cleaners.KeyValueRemover
All Implemented Interfaces:
java.util.EventListener, com.trapezium.chisel.NodeLocatorListener, com.trapezium.chisel.OptionHolder

public class KeyValueRemover
extends InterpolatorMinimizer

The KeyValueRemover removes keys and corresponding keyValues if the following conditions are encountered: 1. a key of the form: ... a a a .... ^ this middle value (one or more) and corresponding keyValue entries are removed. 2. a keyValue of the form ... a a a .... ^ this middle keyValue (one or more) and corresponding key entries are removed.

Version:
b73, 1 July 1998

Nested Class Summary
 
Nested classes inherited from class com.trapezium.chisel.cleaners.InterpolatorMinimizer
InterpolatorMinimizer.KeyInfo
 
Field Summary
protected  java.util.BitSet valueKillBits
           
protected  java.util.Hashtable valueKillTable
           
 
Fields inherited from class com.trapezium.chisel.cleaners.InterpolatorMinimizer
doit, Key, keyKillBits, keyKillTable, KeyValue
 
Fields inherited from class com.trapezium.chisel.Optimizer
baseFileName, baseFilePath, dataSource
 
Constructor Summary
KeyValueRemover()
          Class constructor, super class handles only keys
 
Method Summary
 void attemptOptimization(com.trapezium.vrml.node.Node n)
          template, subclasses override this if they modify Nodes
(package private)  boolean createBitSet(com.trapezium.vrml.fields.MFFieldValue mfKey, com.trapezium.vrml.fields.MFFieldValue mfKeyValue, int keyCount, int factor)
          Create if necessary the BitSets associated with a key field in an interpolator.
(package private)  boolean removeDups(java.util.BitSet killBits, int numberEntries, com.trapezium.vrml.fields.MFFieldValue vals, int factor, boolean checkPreviousValues)
          Mark for removal middle entries in a sequence of identical entries.
 
Methods inherited from class com.trapezium.chisel.cleaners.InterpolatorMinimizer
createBitSet, getActualFactor, getInterpolatorFactor, optimize, replaceable
 
Methods inherited from class com.trapezium.chisel.Optimizer
addAdditionalNode, attemptOptimization, booleanToOptionValue, eofTokens, getActionMessage, getAdditionalName, getNodeName, getNumberAdditionalNames, getNumberOptions, getOptionClass, getOptionConstraints, getOptionLabel, getOptionValue, hasFinalCode, intToOptionValue, isDEFlistener, isDEFUSElistener, isPROTOlistener, isROUTElistener, nodeFound, optimizePossible, optionValueToBoolean, optionValueToInt, printFinalCode, printNumbers, replaceIndexFaceMultiple, replaceRange, replaceStartEnd, replaceValueNodeFaceMultiple, reset, routeFound, setBaseFileName, setBaseFilePath, setDataSource, setNodeName, setOptionConstraints, setOptionValue, setRangeReplacer, summarize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

valueKillTable

protected java.util.Hashtable valueKillTable

valueKillBits

protected java.util.BitSet valueKillBits
Constructor Detail

KeyValueRemover

public KeyValueRemover()
Class constructor, super class handles only keys

Method Detail

attemptOptimization

public void attemptOptimization(com.trapezium.vrml.node.Node n)
Description copied from class: com.trapezium.chisel.Optimizer
template, subclasses override this if they modify Nodes

Overrides:
attemptOptimization in class InterpolatorMinimizer

createBitSet

boolean createBitSet(com.trapezium.vrml.fields.MFFieldValue mfKey,
                     com.trapezium.vrml.fields.MFFieldValue mfKeyValue,
                     int keyCount,
                     int factor)
Create if necessary the BitSets associated with a key field in an interpolator. The values "keyKillBits" and "valueKillBits" are initialized in either case.


removeDups

boolean removeDups(java.util.BitSet killBits,
                   int numberEntries,
                   com.trapezium.vrml.fields.MFFieldValue vals,
                   int factor,
                   boolean checkPreviousValues)
Mark for removal middle entries in a sequence of identical entries.