Search:

Type: Posts; User: speaker

Page 1 of 2 1 2

Search: Search took 0.28 seconds.

  1. Replies
    8
    Views
    463

    Re: Parallel vectors synchronize

    i am trying that but i cant make it work. I have a loop inside a loop and that makes things worse
  2. Replies
    8
    Views
    463

    Re: Parallel vectors synchronize

    inside the loop i find dynamically the values of float numbers and the correspodining values of string1 and string 2
    if i try to create the set inside the loop then the values are not...
  3. Replies
    2
    Views
    572

    Re: Hello! parallel vectors nightmare

    my bad! though i tried to delete one of them:o
  4. Replies
    8
    Views
    463

    Re: Parallel vectors synchronize

    its loaded outside the loop ,and moving that control inside the loop would cause more problems
  5. Replies
    8
    Views
    463

    Parallel vectors synchronize

    Hello,
    in my code i have at some point 3 parallel vectors [float(i)<=>string1(i)<=>string2(i)]

    i wanted to eliminate equal float numbers of the 1st vector ,therefore i create a SET...
  6. Replies
    2
    Views
    572

    Hello! parallel vectors nightmare

    Hello,
    in my code i have at some point 3 parallel vectors [float(i)<=>string1(i)<=>string2(i)]

    i wanted to eliminate equal float numbers of the 1st vector ,therefore i create a SET...
  7. Replies
    5
    Views
    1,650

    Re: EASY [comparing two vectors of strings]

    im sorry
    noob mistake
    i have two vectors containing ITEMS .At the end of the loops of the vectors i get 2 Items and i have to compare them .
    they look like this:

    ITEM...
  8. Replies
    5
    Views
    1,650

    Re: EASY [comparing two vectors of strings]

    I think this answer will be helpful. I will try to work it out now.
    Below there is the output of the two vectors A and B as an example.
    i hope its helpful
    ...
  9. Replies
    5
    Views
    1,650

    EASY [comparing two vectors of strings]

    Hello,
    i have two vectors containing strings.These two vectors they dont have the same length.
    I need to compare the strings between vector A and vector B ,and find sets of similar strings.
    At...
  10. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    that was very helpful. i realised that one of the vectors had always 6 elements ,while the other was incremented by 6 after every loop[duh!]
    So i clear the problematic vector after every loop: ...
  11. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    this is the line: newItem=(Item) src.elementAt(totVector.indexOf(rTOT1min));

    yes it returns that value.it shouldnt.


    hmmm....it suppose to find the corresponding Item for the minValue(float)
  12. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    ###### CALCOLO SCORE ######
    AirCondition_A_Cooling + coffee_request>>>>>rTOT=0.25
    AirCondition_A_Cooling + ENEL >>>rTOT1 0.55
    AirCondition_A_Cooling + EolicGenerator1KW >>>rTOT1 0.53846157...
  13. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    ok im sorry im panicking here..i get an integer which denotes the index
  14. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    hmmmm..it gives me a the min Float number..i thought it would give me an integer
  15. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    well it seems to be working like this,but after a number of loops i get an ArrayOutOfBoundsException after a few loops
    heres the output


    ###### CALCOLO SCORE ######
    AirCondition_A_Cooling +...
  16. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    so,i thought i should add something like this :
    Item newItem = (Item) src.elementAt(totVector.indexOf(rTOT1min)) ; <-------inside the parenthesis goes the index ,correct?...
  17. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    Vector src =new Vector();
    Vector totVector=new Vector();
    for (int j = 0; j < energySource.size(); j++) {
    Item...
  18. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    ok..the loop is done in order to put float values into one vector,and string values to another vector.
    after the loop i find easily the min value of the float vector,but i still cant associate it...
  19. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Re: Hello Hello

    yes this is me! i use an index as you say ,but it returns the values only if executed inside the for loop.
  20. Thread: Hello Hello

    by speaker
    Replies
    22
    Views
    747

    Hello Hello

    **hello**
    ive created two vectors parallely ,one for strings and one for floats.Every string corresponds to a float.Thii is done inside a FOR loop. After the loop i calculate the min of floats and i...
  21. Replies
    10
    Views
    788

    Re: this is easy for those who know java!!

    Hello,
    Would a hashMap be a solution?
  22. Replies
    10
    Views
    788

    Re: this is easy for those who know java!!

    you are absolutely right. I will change the variable's name as you said .Parallelism is needed,but its difficult to be achieved.
    It is compiled but i dont get the correct corresponding values ,so...
  23. Replies
    10
    Views
    788

    Re: this is easy for those who know java!!

    i posted the code.i hope it helps.
    the vectors are declared together,if that is what you ask me:-)
  24. Replies
    10
    Views
    788

    Re: this is easy for those who know java!!

    ok i know you are right but it didnt work for me,and i think i know why.
    when i declare the Item inside the loop it shows me a warning(local variable hides a field!)..is this the problem?



    for...
  25. Replies
    10
    Views
    788

    Re: this is easy for those who know java!!

    There is already a vector containing Items(=strings) ,and i created another vector for the float numbers.
    Every Item corresponds to a float number which is the result of a ranking algorithm.
    I...
Results 1 to 25 of 26
Page 1 of 2 1 2