[kepler-dev] Map / Dictionary Actor

ian.brown@hsbcib.com ian.brown at hsbcib.com
Fri Mar 7 07:53:20 PST 2008

I'm looking for something like a HashMap or Dictionary Actor and, before 
implementing one myself, wanted to check that one does not already exist 
that I have simply overlooked.
The issue is as follows - from a file or a database, I need to read a list 
of Instrument, Pair sizes. For example, if I want to buy 50 Euros and 20 
pounds, I may get the following as input:

EUR, 50
GBP, 20

Once I have read this data, I want to be able to request what the size of 
EUR should be (in this case 50). This is very similar to the Lookup Actor 
except that we're looking up based on a key rather than on an index. It's 
a typical HashMap.

I would envisage an actor with 3 input ports and 2 output ports as 


-> set_key_in
-> set_val_in
-> query_key_in


<- key_out
<- val_out

set_key_in, set_val_in are used to populate the HashMap with key, value 

a token on query_key_in will look up an entry in the HashMap and output 
the result to the output ports. An additional output port could give a 
boolean signal if there was no such entry.

Another boolean input could be used to flush all of the contained entries 
to the output as a sequence of tokens (SequenceToArray could then package 
these into an array or a RecordAssembler could package them into records).

Does such an actor already exist? If not, does the above sound like a 
sensible implementation?


HSBC Bank plc may be solicited in the course of its placement efforts for 
a new issue, by investment clients of the firm for whom the Bank as a firm 
already provides other services. It may equally decide to allocate to its 
own proprietary book or with an associate of HSBC Group. This represents a 
potential conflict of interest. HSBC Bank plc has internal arrangements 
designed to ensure that the firm would give unbiased and full advice to 
the corporate finance client about the valuation and pricing of the 
offering as well as internal systems, controls and procedures to identify 
and manage conflicts of interest.

HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
Registered in England - Number 14259
Authorised and regulated by the Financial Services Authority.


This transmission has been issued by a member of the HSBC Group
"HSBC" for the information of the addressee only and should not be
reproduced and/or distributed to any other person. Each page
attached hereto must be read in conjunction with any disclaimer
which forms part of it. Unless otherwise stated, this transmission
is neither an offer nor the solicitation of an offer to sell or
purchase any investment. Its contents are based on information
obtained from sources believed to be reliable but HSBC makes no
representation and accepts no responsibility or liability as to its
completeness or accuracy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20080307/dc9a797c/attachment-0001.htm

More information about the Kepler-dev mailing list