aggregs.H

00001 /* File:      aggregs.H
00002 ** Author(s): David S. Warren, Swift
00003 ** Contact:   xsb-contact@cs.sunysb.edu
00004 ** 
00005 ** Copyright (C) The Research Foundation of SUNY, , 1993-1998
00006 ** 
00007 ** XSB is free software; you can redistribute it and/or modify it under the
00008 ** terms of the GNU Library General Public License as published by the Free
00009 ** Software Foundation; either version 2 of the License, or (at your option)
00010 ** any later version.
00011 ** 
00012 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
00013 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014 ** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
00015 ** more details.
00016 ** 
00017 ** You should have received a copy of the GNU Library General Public License
00018 ** along with XSB; if not, write to the Free Software Foundation,
00019 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020 **
00021 ** $Id: aggregs.H,v 1.15 2005/08/16 21:23:51 dwarren Exp $
00022 ** 
00023 */
00024 
00025 
00026 % To use some of these predicates, the indicated HiLog predicates must
00027 % be defined in usermod
00028 
00029 :- export 
00030         bagReduce/4,
00031         bagReduce/5,
00032         bagPO/3,
00033         bagPO/4,
00034         bagPO1/3,
00035         bagOf/2,
00036 % to use bagMin, must define in usermod: 
00037 %       :- hilog minimum.  minimum(X,Y,Z) :- X @< Y -> Z=X ; Z=Y.
00038         bagMin/2,
00039 % to use bagMax, must define in usermod: 
00040 %       :- hilog maximum.  maximum(X,Y,Z) :- X @< Y -> Z=Y ; Z=X.
00041         bagMax/2,
00042 % to use bagSum, must define in usermod: 
00043 %       :- hilog sum.  sum(X,Y,Z) :- Z is X+Y.
00044         bagSum/2,
00045 % to use bagCount, must define in usermod: 
00046 %       :- hilog successor.  successor(X,_Y,Z) :- Z is X+1.
00047         bagCount/2,
00048 % to use bagAvg, must define in usermod: 
00049 %       :- hilog sumcount.  sumcount([S|C],X,[S1|C1]) :- S1 is S+X, C1 is C+1.
00050         bagAvg/2,
00051         filterPO/2,
00052         filterPO/3,
00053         filterReduce/4,
00054         filterReduce1/4,  % this predicate only for demonstration purposes.
00055         table_once/1.
00056 
00057 :- import apply/2,apply/3,apply/4 from usermod.
00058 
00059 :- import arg/3, call/1, call_c/1, atom/1, functor/3, '=..'/2 from standard.
00060 :- import member/2, copy_term/2, append/3 from basics.
00061 :- import sort/2, findall/3, bagof/3, excess_vars/4 from setof.
00062 :- import ','/2 from usermod.
00063 :- import variant/2 from subsumes.
00064 
00065 :- import delete_return/2,
00066           get_producer_call/3,
00067           get_ptcp/1,
00068           get_returns/3,
00069           is_incomplete/2,
00070           table_state/4
00071      from tables.

Generated on Wed Jul 26 13:30:44 2006 for XSB by  doxygen 1.4.5