![]() |
Bridges-Java-3.0.1
3.0.1
Bridges(JavaAPI)
|
The This class can be used to create K-d Tree elements, derived from BSTElement. K-D trees can be thought of as the spatial equivalent binary search trees and operate on multiple dimensions (2D and 3D are most common). These trees serve as a representation of the underlying geometrically defined spaces. Specialized versions of these trees include quadtrees and octrees, which subdivide into equal sized quadrants octants at each level, respectively.
This class extends the BSTElement class by adding a dimension property. It also includes a thickness property for displaying the partitioning lines generated by the convex decomposition. This thickness get passed to some constructor KdTreeElement() and to setThickness(). It is purely a graphical attribute.
convenient to generate visual representation to allow for use in a binary search tree implementation.
| K | that is the search key type - this is usually a number, integer or float |
| E | the application data type |
Public Member Functions | |
| KdTreeElement (K k, int dim, float th, KdTreeElement< K, E > l, KdTreeElement< K, E > r, E val, String lab) | |
| KdTreeElement () | |
| KdTreeElement (E e, KdTreeElement< K, E > left, KdTreeElement< K, E > right) | |
| KdTreeElement (K key, E e, KdTreeElement< K, E > left, KdTreeElement< K, E > right) | |
| KdTreeElement (E e) | |
| KdTreeElement (K key, int dim) | |
| String | getDataStructType () |
| KdTreeElement (K key, E e) | |
| KdTreeElement (String label, E e) | |
| KdTreeElement (String label, K key, E e) | |
| KdTreeElement (KdTreeElement< K, E > left, KdTreeElement< K, E > right) | |
| int | getDimension () |
| void | setDimension (int dim) |
| float | getThickness () |
| void | setThickness (float th) |
| KdTreeElement< K, E > | getLeft () |
| KdTreeElement< K, E > | getRight () |
| String | getElementRepresentation () |
Public Member Functions inherited from bridges.base.BSTElement< K, E > | |
| BSTElement () | |
| BSTElement (E e, BSTElement< K, E > left, BSTElement< K, E > right) | |
| BSTElement (K key, E e, BSTElement< K, E > left, BSTElement< K, E > right) | |
| BSTElement (E e) | |
| String | getDataStructType () |
| BSTElement (K key, E e) | |
| BSTElement (String label, E e) | |
| BSTElement (String label, K key, E e) | |
| BSTElement (BSTElement< K, E > left, BSTElement< K, E > right) | |
| K | getKey () |
| void | setKey (K key) |
| BSTElement< K, E > | getLeft () |
| BSTElement< K, E > | getRight () |
| String | getElementRepresentation () |
Public Member Functions inherited from bridges.base.BinTreeElement< E > | |
| BinTreeElement () | |
| BinTreeElement (E e) | |
| BinTreeElement (String label, E e) | |
| BinTreeElement (BinTreeElement< E > left, BinTreeElement< E > right) | |
| BinTreeElement (E e, BinTreeElement< E > left, BinTreeElement< E > right) | |
| String | getDataStructType () |
| BinTreeElement< E > | getLeft () |
| void | setLeft (BinTreeElement< E > left) |
| BinTreeElement< E > | getRight () |
| void | setRight (BinTreeElement< E > right) |
Public Member Functions inherited from bridges.base.TreeElement< E > | |
| TreeElement () | |
| TreeElement (E e) | |
| TreeElement (String label, E e) | |
| TreeElement (TreeElement< E > left, TreeElement< E > right) | |
| TreeElement (E e, TreeElement< E > left, TreeElement< E > right) | |
| String | getDataStructType () |
| void | addChild (TreeElement< E > child) |
| int | getNumberOfChildren () |
| void | setChild (int index, TreeElement< E > child) |
| TreeElement< E > | getChild (int index) |
| String | getDataStructureRepresentation () |
Public Member Functions inherited from bridges.base.Element< E > | |
| String | getDataStructType () |
| Get the Element type name. More... | |
| Element () | |
| Element constructor. More... | |
| Element (E val) | |
| the constructor of Element More... | |
| Element (String label, E val) | |
| Constructor of Element. More... | |
| Element (Element< E > original) | |
| performing deep copy of an element when needed More... | |
| String | getIdentifier () |
| void | setSize (double sz) |
| void | setColor (Color col) |
| Color | getColor () |
| void | setOpacity (float opacity) |
| double | getOpacity () |
| void | setShape (String aShape) |
| ElementVisualizer | getVisualizer () |
| void | setVisualizer (ElementVisualizer visualizer) |
| LinkVisualizer | getLinkVisualizer (Element< E > el) |
| Returns the Element's link visualizer object. More... | |
| String | getClassName () |
| int | compareTo (Element< E > e1) |
| boolean | equals (Element< E > e1) |
| String | getElementRepresentation () |
| String | getDataStructureRepresentation () |
| String | getLinkRepresentation (LinkVisualizer lv, String src, String dest) |
| String | getLabel () |
| void | setLabel (String label) |
| E | getValue () |
| void | setValue (E value) |
| double | getSize () |
| void | setColor (String col) |
| Change the element color. More... | |
| String | getShape () |
| void | setLocation (double locX, double locY) |
| Set the location attributes of an element. More... | |
| double | getLocationX () |
| double | getLocationY () |
| String | toString () |
Public Member Functions inherited from bridges.base.DataStruct | |
| abstract String | getDataStructType () |
| abstract String | getDataStructureRepresentation () |
Additional Inherited Members | |
Protected Member Functions inherited from bridges.base.Element< E > | |
| void | setLinkVisualizer (Element< E > el) |
| Sets the link from this element to a new incoming element. More... | |
| void | removeLinkVisualizer (Element< E > el) |
| Removes the link from this element to a new incoming element. More... | |
| void | validateVal (E value) |
Protected Attributes inherited from bridges.base.DataStruct | |
| String | QUOTE = "\"" |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | K | k, |
| int | dim, | ||
| float | th, | ||
| KdTreeElement< K, E > | l, | ||
| KdTreeElement< K, E > | r, | ||
| E | val, | ||
| String | lab | ||
| ) |
Constructs a KdTreeElement with the provided value, label, key, left and right KdTree elements. The defaults will be used if not provided.
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | ) |
Construct an empty KdTreeElement with no key assigned and left and right pointers set to null.
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | E | e, |
| KdTreeElement< K, E > | left, | ||
| KdTreeElement< K, E > | right | ||
| ) |
Construct a KdTreeElement holding an object "e" with a left pointer assigned to "left" and a right pointer assigned to "right".
| e | the object that KdTreeElement is holding |
| left | the KdTreeElement that should be assigned to the left pointer |
| right | the KdTreeElement taht should be assigned to the right pointer |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | K | key, |
| E | e, | ||
| KdTreeElement< K, E > | left, | ||
| KdTreeElement< K, E > | right | ||
| ) |
Construct a KdTreeElement with a key "key", holding an object "e" with a left pointer assigned to "left" and a right pointer assigned to "right".
| key | the key to be used in a binary search tree implementation |
| e | the object this KdTreeElement is holding |
| left | the KdTreeElement that should be assigned to the left pointer |
| right | the KdTreeElement that should be assigned to the right pointer |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | E | e | ) |
Construct a KdTreeElement holding the object "e", with no key assigned and left and right pointers set to null.
| e | the object this KdTreeElement is holding |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | K | key, |
| int | dim | ||
| ) |
Construct a KdTreeElement given the key and dimension
| key | the key to be used in a binary search tree implementation |
| dim | the dimension of partitioning |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | K | key, |
| E | e | ||
| ) |
Construct a KdTreeElement holding the object "e", with key "key" assigned and left and right pointers set to null.
| key | the key to be used in a binary search tree implementation |
| e | the object this KdTreeElement is holding |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | String | label, |
| E | e | ||
| ) |
Construct a KdTreeElement holding the object "e", with label set to "label", with no key assigned, and left and right pointers set to null.
| label | the label of KdTreeElement that shows up on the Bridges visualization |
| e | the object this KdTreeElement is holding |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | String | label, |
| K | key, | ||
| E | e | ||
| ) |
Construct a KdTreeElement holding the object "e", with label set to "label", with "key" assigned to key, and left and right pointers set to null.
| label | the label of KdTreeElement that shows up on the Bridges visualization |
| key | the key to be used in a binary search tree implementation |
| e | the object this KdTreeElement is holding |
| bridges.base.KdTreeElement< K, E >.KdTreeElement | ( | KdTreeElement< K, E > | left, |
| KdTreeElement< K, E > | right | ||
| ) |
Construct an empty KdTreeElement, with no key assigned, and left and right pointers set to null.
| left | the KdTreeElement that should be assigned to the left pointer |
| right | the KdTreeElement that should be assigned to the right pointer |
| String bridges.base.KdTreeElement< K, E >.getDataStructType | ( | ) |
This method gets the data structure type
| int bridges.base.KdTreeElement< K, E >.getDimension | ( | ) |
Return the partitioning dimension
| String bridges.base.KdTreeElement< K, E >.getElementRepresentation | ( | ) |
Augment the element with the "height" and "balance factor" fields.
| KdTreeElement<K, E> bridges.base.KdTreeElement< K, E >.getLeft | ( | ) |
Return the left child
| KdTreeElement<K, E> bridges.base.KdTreeElement< K, E >.getRight | ( | ) |
Return the right child
| float bridges.base.KdTreeElement< K, E >.getThickness | ( | ) |
Return the thickness of the KdtreeElement; thickness is used in the visualization to draw the partitioning lines
| void bridges.base.KdTreeElement< K, E >.setDimension | ( | int | dim | ) |
Set the dimension of the KdTreElement to key
| dim | the dimension to set |
| void bridges.base.KdTreeElement< K, E >.setThickness | ( | float | th | ) |
Set the thickness of the KdTreeElement
| th | thickness of the partitioner to set thickness is used in the visualization to draw the partitioning lines |
1.8.13