Search:

Type: Posts; User: speaker

Page 1 of 2 1

Search: Search took 0.29 seconds.

by speaker
Replies
8
Views
432

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

by speaker
Replies
8
Views
432

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. Thread: Hello! parallel vectors nightmare

by speaker
Replies
2
Views
540

Re: Hello! parallel vectors nightmare

my bad! though i tried to delete one of them:o

by speaker
Replies
8
Views
432

Re: Parallel vectors synchronize

its loaded outside the loop ,and moving that control inside the loop would cause more problems

by speaker
Replies
8
Views
432

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. Thread: Hello! parallel vectors nightmare

by speaker
Replies
2
Views
540

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. Thread: EASY [comparing two vectors of strings]

by speaker
Replies
5
Views
1,501

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. Thread: EASY [comparing two vectors of strings]

by speaker
Replies
5
Views
1,501

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.
...
9. Thread: EASY [comparing two vectors of strings]

by speaker
Replies
5
Views
1,501

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...

by speaker
Replies
22
Views
714

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: ...

by speaker
Replies
22
Views
714

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)

by speaker
Replies
22
Views
714

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...

by speaker
Replies
22
Views
714

Re: Hello Hello

ok im sorry im panicking here..i get an integer which denotes the index

by speaker
Replies
22
Views
714

Re: Hello Hello

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

by speaker
Replies
22
Views
714

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 +...

by speaker
Replies
22
Views
714

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?...

by speaker
Replies
22
Views
714

Re: Hello Hello

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

by speaker
Replies
22
Views
714

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...

by speaker
Replies
22
Views
714

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.

by speaker
Replies
22
Views
714

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. Thread: this is easy for those who know java!!

by speaker
Replies
10
Views
734

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

Hello,
Would a hashMap be a solution?
22. Thread: this is easy for those who know java!!

by speaker
Replies
10
Views
734

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. Thread: this is easy for those who know java!!

by speaker
Replies
10
Views
734

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. Thread: this is easy for those who know java!!

by speaker
Replies
10
Views
734

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. Thread: this is easy for those who know java!!

by speaker
Replies
10
Views
734

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