Results 1 to 2 of 2

Thread: JAVA incomaptible types

  1. #1
    Join Date
    Feb 2009
    Posts
    96

    JAVA incomaptible types

    I don't understand why I'm getting this error. All I did was copy a working method and changed the variables. I also created a new edge class and a new vert class and changed all their variables.

    Thanx

    Daren



    cityToCity.java:66: incompatible types
    found : Prices
    required: edgeP
    for (edgeP eP : up.adjPrices)
    ^






    public static void runPricePaths(Prices sourceP)
    {
    sourceP.minPrice = 0.;
    PriorityQueue<Prices> pQueue = new PriorityQueue<Prices>();
    pQueue.add(sourceP);

    while (!pQueue.isEmpty())
    {
    Prices up = pQueue.poll();

    // Visit each edge exiting u

    for (edgeP eP : up.adjPrices)
    {
    Prices p = eP.targetP;
    double pweight = eP.weightP;
    double distanceThroughU = up.minPrice + pweight;
    if (distanceThroughU < p.minPrice)
    {
    pQueue.remove(p);

    p.minPrice = distanceThroughU ;
    p.prev = up;
    pQueue.add(p);

    }

    }
    }
    }

  2. #2
    Join Date
    Feb 2009
    Posts
    96

    Re: JAVA incomaptible types

    i figured it out ty

Similar Threads

  1. Replies: 4
    Last Post: 04-09-2013, 11:04 PM
  2. Multiple generic types in java
    By Maya Angelou in forum Software Development
    Replies: 5
    Last Post: 11-03-2010, 01:11 PM
  3. Different types Types CCFL's
    By Zipp in forum Overclocking & Computer Modification
    Replies: 3
    Last Post: 29-10-2009, 09:11 AM
  4. Types of different JDBC driver in JAVA technology
    By GunFighter in forum Software Development
    Replies: 3
    Last Post: 11-09-2009, 02:11 PM
  5. What are the different types of access modifiers in JAVA?
    By Bhim in forum Software Development
    Replies: 4
    Last Post: 25-02-2009, 09:53 PM

Tags for this Thread

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
  •  
Page generated in 1,713,501,203.47701 seconds with 17 queries