Opened 18 years ago
Closed 18 years ago
#515 closed enhancement (fixed)
New funcion Append in Set
Reported by: | Jorge | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | SetAlgebra | Version: | head |
Severity: | minor | Keywords: | |
Cc: |
Description
I'd like to propose a new function to Append elements to an existing Set.
One common situation is when we process one Set A and create k new Sets A1,...,Ak. Normally we can use EvalSet k times to create each A_i or we use one EvalSet that iterate over all elements of A and create the tuples (a1i,...,aki) then use an EvalSet to build Aj selecting the corresponding component in the previous tupple.
We can also use only one EvalSet and use := in combination with the operator <<
Ai := Ai << aij;
but this imply that Ai is destroyied and created every time one more element is added. This could be inneficient in terms of time and memory management.
We think that a function that append and element to an existing Set variable will overcome the previous situation:
Set Append(Set A, Anything item)
the result of that function should be A.
best regards,
Jorge
Change History (1)
comment:1 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000515 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
New function
has been created
Added new test
http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000515