he same order of the list. for example i have a list with 4 different lenght of curve like this:
0= 10
1= 12
2= 8 (minimum)
3= 17 (maximum)
and wont to make a ranking that the longest curve gets the value 4 and the smallest the value 1, like this
0= 2
1= 3
2= 1
3= 4
i tried the sort list function, but it dosn`t work
can anybody help me!
thx a lot…
s suivantes
{0;0} {0;0}
0=longueur (300) 0=longueur (400)
1=largeur (8) 1=largeur (6)
2=hauteur (20) 2=hauteur (8)
{0;1} {0;1}
0=longueur (250) 0=longueur (250)
1=largeur (8) 1=largeur (8)
2=hauteur (12) 2=hauteur (12)
{0;2} {0;2}
0=longueur (400) 0=longueur (300)
1=largeur (6) 1=largeur (8)
2=hauteur (8) 2=hauteur (20)
je souhaite réorganiser mes listes en fonction de la croissance de l'item 1 (soit la largeur) puis en fonction de l'item 2 (la hauteur) néanmoins pour chacune de ces listes les items sont indissociables .
dans l'exemple de gauche la liste de rhino et dans l'exemple de droite la liste que je souhaite obtenir c'est d'abord la largeur qui va croissante puis ,lorsque les largeurs sont identiques ce sont les hauteurs qui vont dans l'ordre croissant .Les longueurs restent assignées à la liste.…
e possible to change the component definition making possible to customize the number of outputs.Now Dispatch moves "true" values to A and "False" values to B
INPUT:
L (List to work on) -> 1, 2, 3, 4, 5, 6, 7, 8
D (Dispatch Pattern) -> True, False
OUTPUT:
A (List) -> 1, 3, 5, 7
B (List) -> 2, 4, 6, 8
Could it be possible/useful to modify it so it could dispatch items to several outputs, like:
INPUT:
L (List to work on) -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
D (Dispatch Pattern) -> A, B, C
OUTPUT:
A (List) -> 1, 4, 7, 0
B (List) -> 2, 5, 8
C (List) -> 3, 6, 9
maybe I'm missing something and there's already a component with this function... I have been searching on the forum for half afternoon, but can't find anything about it!
Thank you!…
Tree:
{0;0;0} N = 2
{0;0;1} N = 1
{0;0;2} N = 3
{0;1;0} N = 5
{0;1;1} N = 8
{0;1;2} N = 10
If we apply the aforementioned mapping to this tree, we'll end up with the following result:
{0;0} N = 6
{0;1} N = 23
Basically {0;0;0}, {0;0;1} and {0;0;2} are combined into a single path {0;0} as we disregard the third index because "C" is no longer present in the target mapping.
Because we only use the Mapper to modify paths, we do not lose any data items, though we might lose some of the paths.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 1:03pm on August 25, 2010
Integer = 0 To 9
val *= 2
lst.Add(val)
Next
Since val is a ValueType, when we assign it to the list we actually put a copy of val into the list. Thus, the list contains the following memory layout:
[0] = 2
[1] = 4
[2] = 8
[3] = 16
[4] = 32
[5] = 64
[6] = 128
[7] = 256
[8] = 512
[9] = 1024
Now let's assume we do the same, but with OnLines:
Dim ln As New OnLine(A, B)
Dim lst As New List(Of OnLine)
For i As Integer = 0 To 9
ln.Transform(xform)
lst.Add(ln)
Next
When we declare ln on line 1, it is assigned an address in memory, say "24 Bell Ave." Then we modify that one line over and over, and keep on adding the same address to lst. Thus, the memory layout of lst is now:
[0] = "24 Bell Ave."
[1] = "24 Bell Ave."
[2] = "24 Bell Ave."
[3] = "24 Bell Ave."
[4] = "24 Bell Ave."
[5] = "24 Bell Ave."
[6] = "24 Bell Ave."
[7] = "24 Bell Ave."
[8] = "24 Bell Ave."
[9] = "24 Bell Ave."
To do this properly, we need to create a unique line for every element in lst:
Dim lst As New List(Of OnLine)
For i As Integer = 0 To 9
Dim ln As New OnLine(A, B)
ln.Transform(xform)
lst.Add(ln)
Next
Now, ln is constructed not just once, but whenever the loop runs. And every time it is constructed, a new piece of memory is reserved for it and a new address is created. So now the list memory layout is:
[0] = "24 Bell Ave."
[1] = "12 Pike St."
[2] = "377 The Pines"
[3] = "3670 Woodland Park Ave."
[4] = "99 Zoo Ln."
[5] = "13a District Rd."
[6] = "2 Penny Lane"
[7] = "10 Broadway"
[8] = "225 Franklin Ave."
[9] = "420 Paper St."
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 6:26am on September 9, 2010
ant to find all paths where exactly two items are the same like in branch {1}. How can I solve this in VB? Is there an easy "search in list" class or do I have to iterate over all items by myself ??
Regards Alex…