Thursday, March 13, 2008

Create a unique list with only few members unique in Graphtalk

Here we would like to make a unique list, be considering just the second and the fourth members. This code can be customised for any such subset
Copy paste the below code(with customisation)!!!
A <=> [
[
$contract:p_ci_std$Ge3T,
"5000001914",
$event:p_evt_financial$1QtRh,
75632,
75638
],
[
$contract:p_ci_std$THYW,
"5000046615",
$event:p_evt_financial$1QtRg,
75635,
75642
],
[
$contract:p_ci_std$THYW,
"5000046615",
$event:p_evt_other$1gI6N,
75635,
75635
],
[
$contract:p_ci_std$CR2Q,
"5000000274",
$event:p_evt_financial$1gI6O,
75631,
75631
],
[
$contract:p_ci_std$CR2Q,
"5000000274",
$event:p_evt_other$1gI6O,
75631,
75631
]
] &
loop
m:lst.member (A, Mem)
define
F = [] &
C = []
do
(
Mem <=> [_, Two, _, Four _] &
C = :lst.append (C?, [[Two, Four]]) &
D = :lst.unique (C) &
if
D <> C
then
(
F = F? &
C = D
)
else
(
F = :lst.append (F?, [Mem]) &
C = D
)


)

1 comment:

Naveen chevendra said...

hi Savitri Jayanth,
Your blog is very good. I feel very happy to see this second blog.Even though this tool is not much popular.It Have lot things to learn from developer's and administrator point of view . I glad to ask can you explain how GraphTalk is managing backend garbagecollector