Re: [eclipse-clp-users] intersection

From: Pradeep Kiruvale <pradeepkiruvale_at_gmail.com>
Date: Wed, 10 Jun 2015 11:55:12 +0200
Hi Joachim,

When I load the data in the eclipse clp it will store everything in a run
time/ stack.

If I want to access the data from other storage system and then process it.

How can I do that?

I tried going through the code. Dint find any leads, can you please point
me how can I do that?

Thanks & Regards,
Pradeep

On 12 December 2014 at 15:03, Joachim Schimpf <jschimpf_at_coninfer.com> wrote:

> On 12/12/14 07:43, Philippe de Rochambeau wrote:
> > Hello,
> >
> > why does
> >
> > intersection([]..[1,2,3]. []..[1,2,3,4,5,6],X) not instanciate?
> >
> > Should you declare variables containing the two sets first?
>
>
> I assume that you are talking about the ic_sets library.
>
> Yes, for an unknown set you have to declare a variable.  There are
> alternative
> ways to do this.  Try the following in an interactive eclipse, e.g.
> tkeclipse:
>
> ?- lib(ic_sets).
> Yes (0.12s cpu)
>
> ?- S1 in_set_range []..[1,2,3].
> S1 = S1{([] .. [1, 2, 3]) : _321{0 .. 3}}
> Yes (0.00s cpu)
>
> ?- S1 subsetof [1 2,3].
> S1 = S1{([] .. [1, 2, 3]) : _338{0 .. 3}}
> Yes (0.00s cpu)
>
> ?- intset(S1, 1, 3).
> S1 = S1{([] .. [1, 2, 3]) : _302{0 .. 3}}
> Yes (0.00s cpu)
>
>
> You example can be written as
>
> ?- S1 subsetof [1, 2, 3], S2 subsetof [1, 2, 3, 4, 5, 6],
>     ic_sets:intersection(S1, S2, X).
> S1 = S1{([] .. [1, 2, 3]) : _721{0 .. 3}}
> S2 = S2{([] .. [1, 2, 3, 4, 5, 6]) : _864{0 .. 6}}
> X = X{([] .. [1, 2, 3]) : _998{0 .. 3}}
> There are 6 delayed goals.
> Yes (0.00s cpu)
>
>
> -- Joachim
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
>
Received on Wed Jun 10 2015 - 09:55:21 CEST

This archive was generated by hypermail 2.2.0 : Thu Jun 18 2015 - 00:13:16 CEST