Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java Parameters and Inheritance question

Name: Javafag 2007-06-07 15:06 ID:8FwQmpEe

Building a Red-Black Tree for a project. Right now I've got a working Binary Search Tree with constructors:

public class BSTree <T extends Comparable>{
    private BSTNode<T> root;
   
    public BSTree(){
    }
    public BSTree(BSTNode<T> n){
        root=n;
    }
    public BSTree(T c){
        root=new BSTNode<T>(c);
    }

And then I've got the Red-Black Tree's constructors:

public class RBTree <T extends Comparable> extends BSTree{
   
    public RBTree (){
        super();
    }
    public RBTree (T c){
        super(c);
    }
    public RBTree (BSTNode<T> n){
        super(n);
    }

My question: Will this handle Parameters correctly? Ex, if I make a RBTree<Integer>(), will it run BSTree<Integer>(), or just BSTree() ?

Sorry for Java faggotry, it's the only language my school teaches.

Name: Anonymous 2007-06-09 21:33 ID:bsYOqMFh

Hi, >>27 here. I'll auto-own myself with this paragraph from Wikipedia:

Random path change algorithms are currently the state-of-the-art search algorithms and work up to 100,000 cities. The concept is quite simple: Choose a random path, choose four nearby points, swap their ways to create a new random path, while in parallel decreasing the upper bound of the path length. If repeated until a certain number of trials of random path changes fail due to the upper bound, one has found a local minimum with high probability, and even further it's a global minimum with high probability (whereas high means that the rest probability decreases exponentially in the size of the problem - thus for 10,000 or more nodes, the chances of failure is negligible).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List