branches in each A's list of B's, or remove its ends etcso that if I want to remove the last B in every A{0;1},{0;2},{0;3},{0;4},{0;5},{0;6}{1;1},{1;2},{1;3},{1;4}{2;1},{2;2},{2;3},{2;4},{2;5}would become{0;1},{0;2},{0;3},{0;4},{0;5}
{1;1},{1;2},{1;3}
{2;1},{2;2},{2;3},{2;4}I guess the question is do I need to figure out the cull pattern- each B may have different lengths...…
rated by "<" symbols. Examples: "2<10", "2<4<10", "Pow(2, 1)<5*Sin(3)<10".
The entered text contains 2 or 3 segments separated by two or more consecutive dots. Examples "2..10", "2..4..10", "Pow(2, 1)....5*Sin(3)..10".
If only two segments are provided, then the initial value will be the same as the minimum value. If a bounds number or a default value is written as a simple number, then the number of decimal places will be harvested. I.e. "2..4..10" is not the same as "2..4..10.00" as the former will result in an integer slider and the latter in a slider with two decimal places.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 10:08am on February 15, 2013
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…