/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2000-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
#include "ivlib.h"
/* This method manages nested intervals so that only points in
** the smallest containing intervals will be visible.
**
** Written by Kiem-Phong Vo.
*/
/* a segment [lo,hi] and associated "data". */
struct Itvl_s
{
};
struct Nest_s
{
};
/* create a new segment identical to p */
static void*
{
return 0;
return np;
}
/* free a segment */
static void
{
}
/* Segments are sorted so that "inside" ones are consider larger */
static int
{
int l;
int h;
return 0;
return -1;
return 1;
if (l < 0)
{
if (h >= 0) /* i1 contains i2 */
return -1;
else
return 0; /* i1 crossing i2 on the left */
}
else if (l == 0)
{
if (h < 0) /* i1 is contained in i2 */
return 1;
else if (h == 0) /* equal segments */
return 0;
else
return -1; /* i1 contains i2 */
}
else /* if (l > 0) */
{
if (h <= 0) /* i1 is contained in i2 */
return 1;
else
return 0; /* i1 crossing i2 on the right */
}
}
{
return -1;
{
}
return -1; /* must have been a crossing element */
{
return 0;
}
else
return 0;
}
{
return -1;
if (!(it = (Itvl_t*)dtsearch(nst->dt, &itvl)) || fvcmp(size, it->lo, lo) || fvcmp(size, it->hi, hi))
return -1;
return 0;
}
/* create a fresh Ivflat handle to compute maximal open segments */
{
return -1;
/* insert "in order" all intervals into the Ivflat handle */
return 0;
}
static unsigned char*
{
return 0;
}
static Ivseg_t*
{
return 0;
}
static int
{
switch (type)
{
case IV_OPEN:
return -1;
{
return -1;
}
break;
case IV_CLOSE:
{
}
break;
}
return 0;
}
{
"nested",
"The nested method manages nested intervals so that only points in the smallest containing intervals will be visible.",
0,
};