Code for working with construction intervals. More...
#include <stdlib.h>#include <string.h>#include "pmm_log.h"#include "pmm_interval.h"#include "pmm_model.h"Go to the source code of this file.
Functions | |
| struct pmm_interval_list * | new_interval_list () |
| void | free_interval_list (struct pmm_interval_list **il) |
| int | isempty_interval_list (struct pmm_interval_list *l) |
| struct pmm_interval * | new_interval () |
| struct pmm_interval * | init_interval (int plane, int n_p, enum pmm_interval_type type, int *start, int *end) |
| void | free_interval (struct pmm_interval **i) |
| struct pmm_interval * | read_top_interval (struct pmm_interval_list *l) |
| int | remove_top_interval (struct pmm_interval_list *l) |
| int | remove_interval (struct pmm_interval_list *l, struct pmm_interval *i) |
| 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) |
| void | print_interval_list (const char *output, struct pmm_interval_list *l) |
| char * | interval_type_to_string (enum pmm_interval_type type) |
| void | print_interval (const char *output, struct pmm_interval *i) |
Code for working with construction intervals.
Construction intervals describe built/unbuilt regions of a model and are core to the optimised construction algorithms
Definition in file pmm_interval.c.
| int add_bottom_interval | ( | struct pmm_interval_list * | l, |
| struct pmm_interval * | i | ||
| ) |
Add an interval to the bottom of the interval list
| l | pointer to the interval list |
| i | pointer to the interval |
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
| l | pointer to interval list |
| i | pointer to interval to add to list |
Definition at line 311 of file pmm_interval.c.
| void free_interval | ( | struct pmm_interval ** | i | ) |
frees an interval structure and members it contains
| i | pointer 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
| il | pointer to address of the interval list |
Definition at line 63 of file pmm_interval.c.
|
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
| plane | plane that the interval belongs to (defunct) |
| n_p | number of parameters of the interval points |
| type | interval tyle |
| start | pointer to the start parameter array |
| end | pointer to the end parameter array |
Definition at line 147 of file pmm_interval.c.
| char* interval_type_to_string | ( | enum pmm_interval_type | type | ) |
map interval type to string for printing
| type | interval type |
Definition at line 400 of file pmm_interval.c.
| int isempty_interval_list | ( | struct pmm_interval_list * | l | ) |
determine if interval list is empty
| l | pointer to interval list |
Definition at line 89 of file pmm_interval.c.
|
read |
Allocate and return an interval structure with default, zero parameter values
Definition at line 105 of file pmm_interval.c.
|
read |
Allocate and return an interval list structure
Definition at line 44 of file pmm_interval.c.
| void print_interval | ( | const char * | output, |
| struct pmm_interval * | i | ||
| ) |
print interval
| output | output stream to print to |
| i | interval 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
| output | output stream to print to |
| l | interval list to print |
Definition at line 374 of file pmm_interval.c.
|
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
| l | pointer to interval list |
| i | pointer to the interval to remove |
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
| l | pointer to the interval list |
Definition at line 225 of file pmm_interval.c.
1.8.1.2