#include "barlib.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
void BAR_delete | ( | BARdesc | BAR | ) |
Destroys a BAR.
BAR | Descriptor of the BAR to destroy. |
References _BARdesc::d_block_data, _BARdesc::d_block_start_x, and _BARdesc::data.
Referenced by best_path().
BARdesc BAR_new | ( | int | N, | |
int | M, | |||
int | W | |||
) |
Creates an N-by-M bar with beam width W.
N | First dimension size of new matrix (see BARdesc). | |
M | Second dimension size of new matrix (see BARdesc). | |
W | Beam width size of new matrix (see BARdesc). |
References _BARdesc::beam_width, _BARdesc::d_block_data, _BARdesc::d_block_start_x, _BARdesc::d_size, _BARdesc::data, _BARdesc::data_size, _BARdesc::vector_size, _BARdesc::x_size, and _BARdesc::y_size.
Referenced by best_path().
int BAR_read | ( | BARdesc | BAR, | |
int | x, | |||
int | y | |||
) |
Reads from a BAR.
Usage:
i = A(x,y)
is expressed as
i = BAR_read(BAR, x, y);
BAR | BAR descriptor | |
x | matrix x coordinate | |
y | matrix y coordinate |
References _BARdesc::beam_width, _BARdesc::d_block_data, and _BARdesc::d_block_start_x.
Referenced by best_path().
void BAR_reinit | ( | BARdesc | BAR, | |
int | N, | |||
int | M, | |||
int | W | |||
) |
Changes the size of a BAR (erasing the contents of the BAR).
BAR | The BAR to resize. | |
N | First dimension new size of matrix (see BARdesc). | |
M | Second dimension new size of matrix (see BARdesc). | |
W | Beam width new size of matrix (see BARdesc). |
References _BARdesc::beam_width, _BARdesc::d_block_data, _BARdesc::d_block_start_x, _BARdesc::d_size, _BARdesc::data, _BARdesc::data_size, _BARdesc::vector_size, _BARdesc::x_size, and _BARdesc::y_size.
void BAR_write | ( | BARdesc | BAR, | |
int | x, | |||
int | y, | |||
int | i | |||
) |
Sets an element of a BAR.
Usage:
BAR_write(BAR, x, y, i);
sets A(x,y) = i.
BAR | BAR descriptor | |
x | matrix x coordinate | |
y | matrix y coordinate | |
i | value to set it to |
References beam_width, _BARdesc::beam_width, _BARdesc::d_block_data, and _BARdesc::d_block_start_x.
Referenced by best_path().