Search the web
Sign In
New User? Sign Up
claireprogramminglanguage · Claire Programming Language - A place to discuss about the CLAIRE language
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Tables   Message List  
Reply | Forward Message #584 of 1160 |
Re: Tables

--- In claireprogramminglanguage@yahoogroups.com, ycaseau
<no_reply@y...> wrote:
> --- In claireprogramminglanguage@yahoogroups.com, "paidi_creed"
> <paidi_creed@y...> wrote:
> > Not quite as brief as the other ones but they do the job.
> >
> > Another question, is it possible to get a list representation of
> the
> > range of a table. I tried to cast the table to a list but got a
> > segmentation fault.
> >
>
> Hi,
>
> a couple of things:
>
> (1) getting a seg fault is a bug. If you can isolate your code
> please report it as a bug (clairebugs@y...) (unless you wrote a
> program and compiled it with safety 5 without runing it under the
> interpreter first :-) )
>
> (2) using table is fine, but have you considered using arrays ?
>
> (3) there is no easy code for converting a table into a list,
> especially because a table encapsulate various methods for storing a
> set of value, from a h-table to an array. You may look at the source
> code and start from the graph attribute of the table. If all you
> need is the set of values contained in the table (set of y for which
> there exists an x such that R[x] = y), you should be able to write
> this code yourself.
>
> Cheers,
>
> -- Yves

Thanks for the advice Yves. I don't think an array would do the job
here, I'm using the table as a dictionary. Would it be better to use
an array and a hash function instead

Thanks,

Paidi





Fri Aug 22, 2003 5:55 pm

paidi_creed
Offline Offline
Send Email Send Email

Forward
Message #584 of 1160 |
Expand Messages Author Sort by Date

Hi, I'm trying to implement an object representing an objective in a map colouring problem with a set of preferences for each colour at each node. I want to be...
paidi_creed
Offline Send Email
Aug 14, 2003
6:33 pm

I solved my problem. I discovered make_table and used that to write the methods [makePreferencesObjective(prob:choco/Problem): PreferencesObjective -> // Seed...
paidi_creed
Offline Send Email
Aug 14, 2003
7:45 pm

... the ... Hi, a couple of things: (1) getting a seg fault is a bug. If you can isolate your code please report it as a bug (clairebugs@...) (unless you...
ycaseau
Offline
Aug 22, 2003
4:10 am

... Thanks for the advice Yves. I don't think an array would do the job here, I'm using the table as a dictionary. Would it be better to use an array and a...
paidi_creed
Offline Send Email
Aug 22, 2003
5:56 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help