next up previous contents
Next: SetUnion Up: SSTable Static Method Descriptions Previous: SSTable Static Method Descriptions

SetIntersect

NAME SetIntersect

PROTOTYPE

#include "SSTable.h"

static ReVarPCifArray<int> * SSTable::SetIntersect(
      ReVarPCifArray<int> * a, ReVarPCifArray<int> * b);
static ReVarPCifArray<int> * SSTable::SetIntersect(
      ReVarPCifArray<int> ** sets, int num);

EXAMPLE

#include "SSTable.h"

SSTable s("MyTable");
...
CifString cs("Target"), col1("column1");
CifString cs2("Target2"), col2("column2");
int errCode = 0;

ReVarPCifArray<int> * iArray;
iArray = SSTable::SetIntersect(s.SearchColumn(cs, col1, errCode),
                               s.SearchColumn(cs2, col2, errCode));
PURPOSE

SetIntersect(ReVarPCifArray *, ReVarPCifArray *) is a static method that returns the logical intersection of two sets of integers.
SetIntersect(ReVarPCifArray **, int) is a static method that returns the logical intersection of any number of sets of integers.

RECEIVES

SetIntersect(ReVarCifArray<int> *, ReVarCifArray<int> *)
a The first set to intersect.
b The second set to intersect.

SetIntersect(ReVarCifArray<int> **, int)
sets An array of pointers to sets of integers.
num The number of elements in the given array.

RETURN VALUE

ReVarPCifArray<int> *, a pointer to a set representing the intersection of all sets passed to it.

REMARKS

These methods are useful for performing multiple column searches with logical AND operations.



Olivera Tosic
12/17/1999