On Sat, Mar 17, 2012 at 08:03:30PM +0100, Waldek Hebisch wrote:
> Serge D. Mechveliani wrote:
> > 
> > On Sat, Mar 17, 2012 at 07:11:30PM +0100, Ralf Hemmecke wrote:
> > > https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/table.spad.pamphlet
> > 
> > -------------------------------------------------------
> > INT  ==> Integer
> > Item ==> Record(key : INT, entry : String)
> > Tab  ==> HashTable(INT, String, "ID")
> > 
> > )abbrev package FOO Foo
> > Foo() : with
> >         tab : () -> Tab
> >  ==
> >   add
> >     tab() ==
> >           item1    := [1, "1"] :: Item
> >           item2    := [2, "2"] :: Item
> >                 itemList : List Item := [item1, item2]
> >           construct(itemList) $Tab
> > -------------------------------------------------------
> > [..]
> 
> This is _hash_ table, no order is required.  Currently valid
> hashfn are EQ, ID, CVEC, EQL, UEQUAL, and EQUAL.  EQ and ID
> are the same and they check if arguments are the same thing
> (that is two different strings consisting if the same
> characters compare as non equal).  EQL is good for numbers.
> CVEC, UEQUAL and EQUAL means the same and compare objects
> look the same.  Normally you want EQUAL.
> 
> Actually, FriCAS HashTable domain is a tiny wrapper over
> Lisp hash tables and semantics is directly taken from
> Lisp.  In practice this means that unless you are using one
> of small set of domains the results will be incorrect,
> in the sense that hash table uses its own notion of
> equality.
> 
> Note that FriCAS has a Table domain, which automatically will
> use HashTable if that works and otherwise use linear search
> on lists (IIUC you want to avoid this).
> 

I need   Appropriate_Table(key : Integer, entry : ConstructedDomain)

for a fast search/insert of  O(log(card table)),

Also  ConstructedDomain  has `Any' inside it, and it would be better 
to avoid SetCategory for  ConstructedDomain.

If this is difficult to organize, it would remain to try Array.

Regards,

------
Sergei
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to