[kepler-dev] Map / Dictionary Actor

Edward A. Lee eal at eecs.berkeley.edu
Fri Mar 7 13:14:25 PST 2008

I am not aware of such an actor, and I agree that one would
be useful...  It becomes a dual to the Record token type
(by being an actor rather than a token).

To be consistent with our naming convention, we would use
setKeyIn rather than set_key_in for the port name.
Note that you can always set the displayName of the port
to be something else...


At 07:53 AM 3/7/2008, ian.brown at hsbcib.com wrote:

>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 follows: 
>-> 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 pairs. 
>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.
>SAVE PAPER - THINK BEFORE YOU PRINT! 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. 
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org

Edward A. Lee
Chair of EECS and Robert S. Pepper Distinguished Professor
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://www.eecs.berkeley.edu/Faculty/Homepages/lee.html  

More information about the Kepler-dev mailing list