pmm  1.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Typedefs | Enumerations | Functions
pmm_interval.h File Reference

data structures for construction intervals More...

Go to the source code of this file.

Data Structures

struct  pmm_interval
struct  pmm_interval_list

Typedefs

typedef enum pmm_interval_type PMM_Interval_Type
typedef struct pmm_interval PMM_Interval
typedef struct pmm_interval_list PMM_Interval_List

Enumerations

enum  pmm_interval_type {
  IT_NULL, IT_BOUNDARY_COMPLETE, IT_GBBP_EMPTY, IT_GBBP_CLIMB,
  IT_GBBP_BISECT, IT_GBBP_INFLECT, IT_POINT, IT_COMPLETE
}

Functions

struct pmm_intervalnew_interval ()
struct pmm_interval_listnew_interval_list ()
int isempty_interval_list (struct pmm_interval_list *l)
void print_interval_list (const char *output, struct pmm_interval_list *l)
struct pmm_intervalread_top_interval (struct pmm_interval_list *l)
int add_top_interval (struct pmm_interval_list *l, struct pmm_interval *i)
int add_bottom_interval (struct pmm_interval_list *l, struct pmm_interval *i)
int remove_top_interval (struct pmm_interval_list *l)
int remove_interval (struct pmm_interval_list *l, struct pmm_interval *i)
void print_interval (const char *output, struct pmm_interval *i)
struct pmm_intervalinit_interval (int plane, int n_p, enum pmm_interval_type type, int *start, int *end)
void free_interval_list (struct pmm_interval_list **il)
void free_interval (struct pmm_interval **i)

Detailed Description

data structures for construction intervals

Construction intervals describe constructed and unconstructed regions of the model. They are essential in the model building algorithms.

Definition in file pmm_interval.h.

Typedef Documentation

typedef struct pmm_interval PMM_Interval

structure describing the construction status of an interval of a model

structure holding the interval list/stack

enumeration of possible model construction interval types

Enumeration Type Documentation

enumeration of possible model construction interval types

Enumerator:
IT_NULL 

null empty interval

IT_BOUNDARY_COMPLETE 

for models in terms of more than one parameter, specifies that a boundary axis of the model is complete

IT_GBBP_EMPTY 

initial empty GPPB interval type

IT_GBBP_CLIMB 

construction interval where model is still climbing (for GBBP)

IT_GBBP_BISECT 

construction interval where model has taken descending form (for GBBP)

IT_GBBP_INFLECT 

construction interval where model is being tested for accuracy and may almost be complete

IT_POINT 

construction interval that defines a single point where a benchmark is required

IT_COMPLETE 

construction interval which is complete and does not need further testing

Definition at line 35 of file pmm_interval.h.

Function Documentation

int add_bottom_interval ( struct pmm_interval_list l,
struct pmm_interval i 
)

Add an interval to the bottom of the interval list

Parameters
lpointer to the interval list
ipointer to the interval
Returns
0 on success

Definition at line 343 of file pmm_interval.c.

int add_top_interval ( struct pmm_interval_list l,
struct pmm_interval i 
)

link the interval into interval list at the top/front

Parameters
lpointer to interval list
ipointer to interval to add to list
Returns
success always

Definition at line 311 of file pmm_interval.c.

void free_interval ( struct pmm_interval **  i)

frees an interval structure and members it contains

Parameters
ipointer to address of the interval

Definition at line 188 of file pmm_interval.c.

void free_interval_list ( struct pmm_interval_list **  il)

frees an interval list structure and members it contains

Parameters
ilpointer to address of the interval list

Definition at line 63 of file pmm_interval.c.

struct pmm_interval* init_interval ( int  plane,
int  n_p,
enum pmm_interval_type  type,
int *  start,
int *  end 
)
read

Initialize an interval with parameters passed.

Function maybe be used with _INFLECT and _BISECT intervals and with _POINT intervals if the start parameter is set to the point. May also be used to on initial IT_GBBP_CLIMB but not once climb_step is non-zero

Parameters
planeplane that the interval belongs to (defunct)
n_pnumber of parameters of the interval points
typeinterval tyle
startpointer to the start parameter array
endpointer to the end parameter array
Returns
pointer to a newly allocated interval with values initialised as per the arguments passed

Definition at line 147 of file pmm_interval.c.

int isempty_interval_list ( struct pmm_interval_list l)

determine if interval list is empty

Parameters
lpointer to interval list
Returns
1 if list is empty, 0 if list is not empty

Definition at line 89 of file pmm_interval.c.

struct pmm_interval* new_interval ( )
read

Allocate and return an interval structure with default, zero parameter values

Returns
pointer to the allocated structure or NULL on failure

Definition at line 105 of file pmm_interval.c.

struct pmm_interval_list* new_interval_list ( )
read

Allocate and return an interval list structure

Returns
pointer to new interval list

Definition at line 44 of file pmm_interval.c.

void print_interval ( const char *  output,
struct pmm_interval i 
)

print interval

Parameters
outputoutput stream to print to
iinterval to print

Definition at line 431 of file pmm_interval.c.

void print_interval_list ( const char *  output,
struct pmm_interval_list l 
)

print interval list

Parameters
outputoutput stream to print to
linterval list to print

Definition at line 374 of file pmm_interval.c.

struct pmm_interval* read_top_interval ( struct pmm_interval_list l)
read

Definition at line 205 of file pmm_interval.c.

int remove_interval ( struct pmm_interval_list l,
struct pmm_interval i 
)

Removes and deletes an interval from an interval list

Parameters
lpointer to interval list
ipointer to the interval to remove
Returns
1 on success

Definition at line 271 of file pmm_interval.c.

int remove_top_interval ( struct pmm_interval_list l)

Removes and deletes the top interval on an interval list

Parameters
lpointer to the interval list
Returns
0 on failure, 1 on success

Definition at line 225 of file pmm_interval.c.