Graph search problem

och, were to start. I have implemented an Adjaceny set Graph using list of nodes and edges, the problem that I'm having is with the find path kind of breadth first search but with problems.
What I'm doing is having two queues one for visited nodes and one for nodes that have not bee visited. so my find path method takes in two nodes the source and destination and performs an initial check to see if the nodes are not already connected, if they are then all is well if not things go a bit pear-shaped.
what happens so I have one Q opeanQ with the first node that has been visited and then I search for all the edges that leave this node and add them to the closed Q for them to be search then I enter a while loop that checks to see if the closed Q is not empty and also checks to see if the openQ of visited nodes does not contain a node that we are about to determine if it connects to the destination or not, but what happens is that when it checks the openQ to see if a node in the closedQ exists there it does but it shouldn't cause the openQ only has one node in it the source node so far.
What I think is happening is a pass by reference problembut not too sure how to get around it, cuase the graph is made up of linked list of nodes and I think that when it is in the open Q it is still reffereing to the linked list of graph nodesand when I check to see if a node in the openQ exists or not it always returns true for all nodes because of the getNextNode call to cycle through all the nodes in the openQ but it should only contain one, but think that its getting more nodes due to it being attached a linked list of nodes an seems to be referencing it somewhere.
any ideas
I've got about 10 classes if you want them posted or have futher questions let me know

Normally I would be happy to help you, but after several years of trying to help here, I've decided not to contribute anymore because of the piss-poor way in which this site is being administered.
Others are still helping, but more may leave if things don't improve. May I recommend devshed or javaranch?
http://www.devshed.com/
http://www.javaranch.com/
If you would like to complain to the admins of this forum, either click the "Report Abuse" link or the "Feedback" link.
-- foofoo (shamelessly stolen the text from jverd).

Similar Messages

  • XY Graph Cursor Problem in Labview 7.1.1?

    Hallo,
    I am  using Labview 7.1.1 and I am facing one problem with XY graph cursor. If I am moving cursor in one graph, I am expecting same movement in another Graph. But when I move cursor in Graph1, cursor in second graph moves but not to exact X value of Graph1.
    Property of Cursor in both graphs must be "Lock to Plot"
    If any body knows about this please let me know ASAP. I am attaching example VI for your reference.
    Thanks,
    Sashi
    Attachments:
    XY Graph Cursor Problem.vi ‏101 KB

    It's a curious effect. Probably the floating point coordinate is sensitive to the exact pixel alignment (I mean that this would not happen if we had for example 1 pixel per point in the X direction).
    Anyway, if you use Cursor Index instead (which is an integer) the behaviour is as expected.
    Paolo
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • Outlook 2010, Exchange 2010 - Searching Problems

    Anyone out there able to help with some searching problems some of our users have been seeing?
    Searching in OWA works fine but some people have problems when searching for older emails in Outlook. We've rebuilt Outlook profiles, rebuilt the windows index's (which seems to work but only temporarily). If there's a way to schedule the Windows index to
    rebuild every night or once  week, I'd be very happy to test that out but haven't been able to figure out how to do that.
    Anyone have any other ideas?

    Hi,
    It seems something keeps corrupting the index... Run Anti-virus program and Malicious Software Removal Tool to scan your system, check if there's any virus or malware that may cause the index issue.
    If this issue persists, please also go to File tab ->
    Options -> Search -> Indexing Options
    -> Advanced -> Click Troubleshoot search and indexing, to do some troubleshooting steps to find the possible cause.
    I hope this helps.
    Regards,
    Melon Chen
    TechNet Community Support

  • Graph connectivity problem-adjacency list-connected graph-Theta complexity

    I am stuck up on this problem:
    I want to find an algorithm of Theta(n+m) complexity, which will examine
    if a non-directed graph is connected (synectic).
    We assume that the representation of the graph has been made with an
    adjacency list with n vertices and m edges.
    Thanks in advance.

    A BFS or DFS from any node in your graph should be T(n+m) in case of an adjacency list (instead of a adjacency matrix). When the search is finished, compare the number of visited nodes to the total number of nodes in the graph. If they're not equal, the graph is not connected.

  • List View Web Part Search problem

    We have a problem with the search in the
    List View Web Part (SearchBox).
    If you enter anything in SearchBox
    and the beginning of the search, nothing happens.
    This problem only occurs in non-admins.
    In this case, the browser generates an error:
    "inplview" not defined.

    I have the same problem. I think the problem is related to the Publish feature.
    Any ideas?

  • Google search problem in safari

    I went to do a google search and used the window in Safari. When I hit go, I get results but they look strange. Only the search term and then most of it is blank. It's as if the page is so big that I can't see the rest.  When I go to the bottom of the page it says Mobile, but nothing else. When I tap beside it, it went to a "classic" view as if on the desktop of your computer, but then I could not see what I was typing in the search box. It was invisible. No problem with Bing or Yahoo.
    I also have noticed on a page that I normally check that the login button was not there. I could click where the login button usually is and then it will take me to the page, but what I type is also invisible.
    I have an iPhone 4s 5.1.1. No problems on my husbands iPhone 4s.
    Will try to restore.
    Has this happened to anyone?

    Restore has fixed it.

  • How to fix the search problem due to timezone?

    I live in GMT+8 timzone. I just migrated a site from SP2010 to SP2013. After migrated when I search for a managed property (datetime) all results return is 1 day later.
    To troubleshoot the problem, I setup a new managed property using "Text" datatype. In refinement panel for that managed property I found the refinement are all looks like 2013/12/11 16:00:00. (which should be 2013/12/12 00:00:00)
    The old server is running in GMT+8. The only different is SP2010 and SP2013.I have changed the web application -> general settings -> timezone to GMT+8 and the site collection settings as well. We did not enable "My site" so there
    is no personal regional settings. What else I can check?  What should I check and how can I make the search work as expected?

    Once a document is stored and uploaded it has the UTC time stamp on it. Now this timestamp cannot be changed.
    So you either use timezone when the document was uploaded or use it the same way. 
    BTW what difference does it make with the time it shows?
    The field in question is designed to store a "Date" value only not the "Time". The time is always 00:00:00.
    In the old farm, users search for 2013/12/31 will get the results with field value 2013/12/31. Now in the new farm, with the timezone problem, search for 2013/12/31 will get the results with field value 2014/1/1

  • Search problem with ActiveDirectory - please help

    Hi,
    I've tried to get a list of the users out of the Active Directory.
    But I just can't get my code to work. It returns nothing back.
    The problem should be simple. But I can not figure out why.
    Please help!
    Raymond
    import javax.naming.*;
    import javax.naming.event.*;
    import javax.naming.directory.*;
    import javax.naming.ldap.*;
    import java.util.Hashtable;
    import java.util.Vector;
    import java.util.Enumeration;
    public class AdClient {
    public AdClient() {
    getUsers();
    public static void main(String args[]) {
    Client client = new Client();
    private void getUsers() {
    // domain = utest
    String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";
    String HOST = "ldap://192.168.128.50:389";
    String SEARCHBASE = "ou=Users,dc=utest,dc=com";
    String FILTER = "cn=*";
    try {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
    env.put(Context.PROVIDER_URL, HOST);
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
    env.put(Context.SECURITY_CREDENTIALS,"admin");
    DirContext ctx = new InitialDirContext(env);
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    NamingEnumeration results;
    // now search for the users
    results = ctx.search(SEARCHBASE, FILTER, constraints);
    while (results.hasMoreElements()) {
    SearchResult sr = (SearchResult)results.nextElement();
    System.out.println(sr.getName());
    ctx.close();
    } catch(Exception e) {
    e.printStackTrace();
    }

    I tried your code...
    There were two issues I saw, when I changed them it worked!
    1) public static void main(String args[]) {
    Client client = new Client();
    should be
    public static void main(String args[]) {
    AdClient client = new AdClient();
    2) String SEARCHBASE = "ou=Users,dc=utest,dc=com";
    env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
    Should be
    String SEARCHBASE = "ou=Users,dc=utest,dc=newcom,dc=com";
    env.put(Context.SECURITY_PRINCIPAL, "[email protected]");

  • RoboHelp HTML 8 Search problem

    I have a single (non-merged) RoboHelp 8 HTML project in which I cannot seem to get Search working correctly.
    I expected to see a box into which I can type a search term and a blank pane below the Contents/Index/Search/Glossary bar where search results would appear.  Instead, I get the following when I generate WebHelp:
    This problem appears in IE 6, IE 7, Firefox 3.0, and Firefox 3.5, all of which our customer base uses.  I'm using RoboHelp 8 on a Windows PC with XP Pro 2002, SP3.
    In the Project Settings/General dialog, I have the default settings for the Stop List and the Always Ignore List selected.  For "Add new keywords to" I have "Index File (HHK)" selected, and "Binary Index" is selected.
    When generating WebHelp, I have the following set:
    General selections:  Under "Additional Options," "Apply to all Topics," "CSS" is selected, with the correct CSS name displayed.  "Add Mark of the Web" is selected.
    Navigation selections:  For Toolbar Buttons, Contents, Index, Search, Glossary are selected.  For Search Options, "Enable Highlight Search Results" is selected.
    Navigation Pane Preferred Format selection is Pure HTML.  (We tried DHTML/HTML but that resulted in an empty nav pane and a nonfunctional index.)
    Optimize Speed For:  Web Site (Internet)
    Publish:  Republish All.
    What are we doing wrong?  I'm totally stumped and I can't seem to find any help on this issue anywhere.  Thanks!

    Hi there
    Please do expound.
    MSMoore9412 wrote:
     I finally succeeded in getting a Search pane that looked right and performed correctly by deselecting the Mark of the Web option.
    To my knowledge this option only affects the output when you view things locally, as in when you are testing the output immediately after generating. Are you saying here that it somehow affected things after you uploaded the files to the server?
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • XY graph zoom problem

    Hello,
    There is a issue when you zoom in using a XY graph. Say you have a two points one at 0,0 and another at 10000,10. If you zoom in to say point 5000,5 the centre point the line will be way off nowhere near where it should be crossing. I was wondering if anyone knows a fix for this problem?
    Thanks

    I agree that this does not look right, but is probably due to limitations in the math used. Once you zoom into the area of iterest, the position of the line actually changes as a function of zoom level. (for example, the 5000 crossing of the line is at 5.00, then at 5.015, then at 5.16). I am sure the accuracy it could be improved, but maybe at a cost of performance.
    It should definitely be investigated.
    LabVIEW Champion . Do more with less code and in less time .

  • Numbers search problem

    I have Numbers 08, OX, the search works some of the time but will suddenly quit. The other day I was searching books by a certain author, to compare to a list of her books, trying to figure out which ones I had not read. (yes, I keep a log of the books I have read). For instance, I had searched & found a book, then searched for another, no find. Yet, when I looked at the one before, I see the one I searched for a few lines below. I tried other searches that should have landed on books but nothing happened. I quit Numbers & then checked it again, nada. It is working today...did it just need a reboot of Mac? I really can't imagine software that requires that. Oh yes, there were about 30 books that I searched.
    Thanks for your help in solving my problem in Numbers.

    I have Numbers 08, OX, the search works some of the time but will suddenly quit. The other day I was searching books by a certain author, to compare to a list of her books, trying to figure out which ones I had not read. (yes, I keep a log of the books I have read). For instance, I had searched & found a book, then searched for another, no find. Yet, when I looked at the one before, I see the one I searched for a few lines below. I tried other searches that should have landed on books but nothing happened. I quit Numbers & then checked it again, nada. It is working today...did it just need a reboot of Mac? I really can't imagine software that requires that. Oh yes, there were about 30 books that I searched.
    Thanks for your help in solving my problem in Numbers.

  • Bar graph legend problem

    Hi I am using JDeveloper Studio Edition Version 11.1.1.3.0.
    My problem is that I have made a bar graph inside an af:showDetailItem but the legends isn´t shown correct. I can´t see the legends at all when I place the legends in the bottom and if I place them in the right I can see half of the text. The source code is below. If someone can see something wrong in this code don´t hesitate to point it out or if someone know how to get this to work please let me know. To me it looks like a bug but I could be wrong.
    <af:showDetailItem text="Søgulig gongd" id="sdi8"
    stretchChildren="first">
    <dvt:barGraph id="barGraph1"
    value="#{bindings.TrxBrw360JLHistoryGraphRO1.graphModel}"
    subType="BAR_VERT_STACK"
    partialTriggers="::pc1:t1"
    dynamicResize="DYNAMIC_SIZE">
    <dvt:background>
    <dvt:specialEffects/>
    </dvt:background>
    <dvt:graphPlotArea/>
    <dvt:seriesSet>
    <dvt:series/>
    </dvt:seriesSet>
    <dvt:o1Axis/>
    <dvt:y1Axis/>
    <dvt:legendArea automaticPlacement="AP_NEVER"
    position="LAP_BOTTOM"/>
    <dvt:o1Title id="o1Title1" text="Tíðarskeið"/>
    <dvt:y1Title id="y1Title1" text="Upphædd"/>
    </dvt:barGraph>
    </af:showDetailItem>

    Hi,
    I stumpled accross this thread and fear I will hit the same problem with a new customer request.
    Has a bug been filled for this?
    Could not find anything relevant in metalink.
    regards
    Peter

  • Graph Legend problem

    Hi all.
    I am using Studio Edition Version 11.1.1.0.1 and got some problems with graph legend. I have a Pie chart and a bar graph which are made from the same read only view object and I can´t understand why the legend on them don´t show the same things when they are made from the same view object. The pie has a status attribute choosen as slices and the bar graph has the same status attribute choosen as bars and it is these things I thought decide what names are shown in the legend. The values for the status are shown in the legend names but the pie shows the legend names in the same order as the query in the view object while the the bar graph show them in the opposite order. How can I make them show the legend names in the same order?
    Atlantic Viking

    Hi,
    I stumpled accross this thread and fear I will hit the same problem with a new customer request.
    Has a bug been filled for this?
    Could not find anything relevant in metalink.
    regards
    Peter

  • Location search problem with iPhone map

    I am posting this to see if anybody else have the same problem, and hopeful a solution as well.
    The problem is that iPhone map started from a 3ird party software does not use my current location by default. For example, I did a search for pizza in google search. The google app will give me a list of local pizza places in their page. But if I click on show all results, it brings up the map app and displays a few pizza places around the world. But shouldn't it give me results in my local area instead? At first, I thought this is a google problem. But I see the same problem later with another voice search app. Have anyone experience this with their iPhone?
    Thanks in advance to any insight on this.

    I've already done it.
    Do you think this will help?
    I doubt that Apple will listen to us. Users with a problem that occurs quite a lot.

  • SQL REPORT BUT SEARCH PROBLEM ON CREATED_ON Column

    Hi Friend,
    i have create SQL Report .
    My Code
    select      CRM_SALES_DEALs.id,
                        "CRM_SALES_CUSTOMERS"."CUSTOMER_NAME" as "CUSTOMER_NAME",
          "CRM_SALES_SALESREPS"."REP_LAST_NAME"||', '||
          "CRM_SALES_SALESREPS"."REP_FIRST_NAME" as "REP_NAME",
           "CRM_SALES_DEALS"."DEAL_CLOSE_DATE" as "DEAL_CLOSE_DATE",
           "CRM_SALES_DEALS"."DEAL_PROBABILITY" as "DEAL_PROBABILITY",
          "CRM_SALES_DEAL_STATUS_CODES"."STATUS_CODE" as "STATUS_CODE" ,
             "CRM_SALES_DEALS"."DEAL_AMOUNT" *
             "CRM_SALES_DEALS"."DEAL_PROBABILITY" / 100 weighted_forecast,
    (select count(*) from CRM_SALES_DEAL_notes where deal_id = "CRM_SALES_DEALS".id) notes,
    (select count(*) from CRM_SALES_DEAL_products where deal_id = "CRM_SALES_DEALS".id) products,
    nvl("CRM_SALES_DEALS".updated_on,"CRM_SALES_DEALS".created_on) last_changed,
    t.territory_name,
    CRM_SALES_DEALS.qtr, "CRM_SALES_DEALS"."CONTACT_NAME" as "CONTACT_NAME"
    from     
    "CRM_SALES_SALESREPS",
    "CRM_SALES_DEAL_STATUS_CODES" ,
    "CRM_SALES_CUSTOMERS",
    "CRM_SALES_DEALS",
    CRM_SALES_territories t
    where  
    CRM_SALES_customers.customer_territory_id = t.id(+) and
    "CRM_SALES_DEALS"."CUSTOMER_ID"="CRM_SALES_CUSTOMERS"."ID"(+)
    and      "CRM_SALES_DEALS"."DEAL_STATUS_CODE_ID"="CRM_SALES_DEAL_STATUS_CODES"."ID"(+)
    and      "CRM_SALES_DEALS"."SALESREP_ID_01"="CRM_SALES_SALESREPS"."ID"(+)
    and (:p1_find is null or instr(upper("CRM_SALES_CUSTOMERS"."CUSTOMER_NAME"),upper(:p1_find))>0 or instr(upper("CRM_SALES_DEALS"."DEAL_NAME"),upper(:p1_find))>0 or
    instr(upper("CRM_SALES_SALESREPS"."REP_FIRST_NAME"||' '||"CRM_SALES_SALESREPS"."REP_LAST_NAME"),upper(:p1_find))>0)
    and
    (nvl(:P1_TERRITORY,0) = 0 or t.id= :P1_TERRITORY)
    and
    (nvl(:P1_ACCOUNT,0) = 0 or "CRM_SALES_CUSTOMERS".id = :P1_ACCOUNT)
    and
    (nvl(:P1_QUARTER,'0') = '0' or CRM_SALES_deals.qtr = :P1_QUARTER)
    and
    nvl(DEAL_PROBABILITY,10) between nvl(:P1_MINIMUM_PROBABILITY,0) and nvl(:P1_MAXIMUM_PROBABILITY,100) or
    instr(upper("CREATED_ON"),upper(nvl(:P1_CREATE_DATE,"CREATED_ON")))My TAble
    CREATE TABLE  "CRM_SALES_DEALS"
       (     "ID" NUMBER,
         "CUSTOMER_ID" NUMBER NOT NULL ENABLE,
         "DEAL_NAME" VARCHAR2(255),
         "DEAL_CLOSE_DATE" DATE NOT NULL ENABLE,
         "DEAL_CLOSE_DATE_ALT" DATE,
         "DEAL_STATUS_CODE_ID" NUMBER,
         "DEAL_CUSTOMER_LOCATION" VARCHAR2(4000),
         "CREATED_BY" VARCHAR2(255),
         "CREATED_ON" DATE,
         "UPDATED_BY" VARCHAR2(255),
         "UPDATED_ON" DATE,
         "QTR" VARCHAR2(8),
         "DEPARTURE_DATE" DATE,
         "DEAL_SOURCE" VARCHAR2(15),
         "ADDRESS1" VARCHAR2(255),
          PRIMARY KEY ("ID") ENABLE
    /i want to search with CREATE_ON Column.
    How can i create code for search in my Quary Code.
    My Item is :P1_CREATE_DATE
    I have try it in last Line in code but it's show me Error.Invalid Relational Operator .
    How can i slove and serch with Created_on Column.
    Thanks
    Edited by: 805629 on Dec 27, 2010 9:13 PM
    Edited by: 805629 on Dec 27, 2010 9:13 PM

    Hi Friends,
    i have sortout this problem.
    Thanks

Maybe you are looking for

  • MS word .doc or .docx attachments won't send or receive in Thunderbird

    I'm running Mac OS X 10.9.5 and Thunderbird 31.5.0. When I attach a .doc or .docx file in Thunderbird to an outgoing message, the attachment disappears. The outgoing message sends as normal, but when I go into my sent folder, there's no attachment, a

  • DW9 (CS3) split view not work with ASP files?

    I just installed and ran DW CS3 (ver 9.0 bulid 3481) -- I use "coder" view for the screen layout. I like the split-view style since I code inline HTML with my ASP and ASPX code. However, the new version has the split-screen view button grayed out. Ho

  • Photo syncing issue

    When I connect my iPhone to my HP Windows XP laptop the computer does not recognize the iPhone as a removable drive (it did for my blackjack before I got this a few days ago), and I cannot seem to figure out a way to import my pictures in from the iP

  • How to make a call in J2ME MIDLET

    How to activate a call in J2ME ? Eg. On click of an icon a call should be made to a predifined number in the app.

  • Help with my first PKGBUILD script [solved]

    Hi There I am trying to write my first PKGBUILD script and I am landing in a bit of trouble.  The script is short and is: #Contributor: iKevin <kellwood-at-ameritech.net> pkgname=fpm pkgver=0.60 pkgrel=1 pkgdesc="A password manager for gnome" url="ht