09-30-2011 12:13 PM
I've got two clusters with numerical elements:
1: a,b,c,d
2: a,b,e
Now, I want to convert the first cluster to the second one.
What is the best way to do this?
Solved! Go to Solution.
09-30-2011 12:24 PM
Raggie,
This is a fine example of a question which will only generate more questions.
What is the relationship between elements c and d of cluster 1 and element e of cluster 2? Without information about that relationship, it is impossible to answer your question.
Lynn
09-30-2011 12:47 PM
I should have clarified that a bit more indeed.
The first cluster consists of 5 I32 numbers with label's a,b,c,d and e.
I'd like to create a new cluster (/convert this to a new cluster) with elements a,b and f (also I32), where a and b have the same value as in the first cluster and f depends on some other calculations.
09-30-2011 01:05 PM
Unbundle the data from Cluster 1, connect a and b to the corresponding elements on a Bundle for Cluster 2. Connect the desired value to the f element on the Bundle.
Lynn
09-30-2011 01:51 PM
Ok, thank you
Is it also possible to do this with some kind of typecast?
09-30-2011 02:49 PM
Typecast is used primarily to transform data from one type to another and does so by converting everything to a flattened string and then attempting to convert it to the new data type. It usually works best on data types which are closely related in terms of how the data is represented and stored in memory. Even it you succeeded in doing this you would still need a Bundle primitive to put the value of f into Cluster2.
Lynn