Results 1 to 9 of 9

Any Java programmers?

This is a discussion on Any Java programmers? within the Off Topic forums, part of the Entertainment category; I need some help with a program I'm trying to make for my final project in my programming class....
Page: 1


  1. #1
    bigdaddy52
    Guest

    Default

    I need some help with a program I'm trying to make for my final project in my programming class.

  2. #2
    Zxenke
    Guest

    Default

    I know Java from my university classes. I might be able to help. Get me on MSN, [email protected] or AIM, TrianLynx713

  3. #3
    Banned
    Join Date
    Mar 2006
    Posts
    191

    Default

    I can help also

  4. #4
    agendas
    Guest

    Default

    i have AP Computer Science AB exam tomorrow 2nd lvl

  5. #5
    Zxenke
    Guest

    Default

    He fixed the problem btw

    I need help though, hehe.

  6. #6
    evilwevel
    Guest

    Default

    i'm busy making my Java project to :lol:

    it's so frustrating when it doesn't want to work, i'm trying to get my SQL statements right, but they're a pain in the ass.

  7. #7
    LadyTorr
    Guest

    Default

    I know Java from my university classes. I might be able to help. Get me on MSN, [email protected] or AIM, TrianLynx713[/b]
    Can I add you too? :P

    I need help with an array loop..

  8. #8
    Zxenke
    Guest

    Default

    Can I add you too? :P

    I need help with an array loop..[/b]
    Sure, np Torr ^^

    Anyone know how to code a breadth-first search of an undirected graph? This is my code and for some reason it only checks one node and exits, then fails elsewhere cuz it didn't traverse the entire graph.

    Code:
    private static void computePath() {
    ****Vertex start=network.getVertex("NODE1"); //getVertex() returns vertex instance associated with the String key
    ****LinkedList<Vertex> currentPath=new LinkedList<Vertex>();
    ****currentPath.add(start);
    ****start.setMark(Vertex.Mark.VISITED); //setMark() sets an enum mark
    ****while (!currentPath.isEmpty()) {
    ********Vertex head=currentPath.get(0);
    ********currentPath.remove();
    ********try {
    ************LinkedList<Vertex> neighbors=
    ****************(LinkedList<Vertex>)network.getNeighborVertices(head); //getNeighborVertices() returns a collection of vertice instances that neighbor the Vertex key
    ************for (Vertex neighbor: neighbors) {
    ****************Edge edge=network.getEdge(head.getName(), neighbor.getName()); //getEdge() returns the Edge instance associated with the two vertice String keys
    ****************if (edge.getMark()==Edge.Mark.UNEXPLORED){
    ********************Vertex w=network.getVertex(edge.getFrom());;
    ********************if (edge.getFrom().compareTo(head.getName())==0) { //getFrom() returns the String key that is one vertex of the Edge
    ************************w=network.getVertex(edge.getTo());
    ********************}
    ********************if (head.getMark()==Vertex.Mark.UNEXPLORED){
    ************************edge.setMark(Edge.Mark.DISCOVERY);
    ************************head.setMark(Vertex.Mark.VISITED);
    ************************neighbor.setPredecessor(head); //setPredecessor() sets the Vertex predecessor used later to determine the path taken
    ************************currentPath.add(w);
    ********************}
    ********************else {
    ************************edge.setMark(Edge.Mark.CROSS);
    ********************}
    ****************}
    ************}
    ********} catch (NoSuchVertexException nsve) {
    ************nsve.printStackTrace();
    ********}
    ****}
    ****path.clear();
    ****Vertex currentNode=network.getVertex("NODE2");
    ****path.add(currentNode);
    ****while (currentNode.getPredecessor()!=null) {
    ********path.add(currentNode.getPredecessor());
    ********currentNode=currentNode.getPredecessor();
    ****}
    }

  9. #9
    evilwevel
    Guest

    Default

    Sure, np Torr ^^

    Anyone know how to code a breadth-first search of an undirected graph? This is my code and for some reason it only checks one node and exits, then fails elsewhere cuz it didn&#39;t traverse the entire graph.[/b]
    to much for me :lol:

    i&#39;m already having a hard time getting my database to communicate with my application

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •