Bell handling utilities for local trigonomatric transforms.
More...
Defines |
#define | ENTEREXIT 0 |
Functions |
REAL | dualabell (REAL(*origbell)(int, int), int laplength, int t) |
void | bell_1size_init (REAL *bellout, REAL(*whichbell)(int, int), int lapleft, int center, int lapright, int dual_flag) |
void | fold_e_e_1s (REAL *coef, REAL *fcn, int numpts, REAL *left, int n_left, REAL *right, int n_right, REAL *bell, int dir) |
void | fold_e_o_1s (REAL *coef, REAL *fcn, int numpts, REAL *left, int n_left, REAL *right, int n_right, REAL *bell, int dir) |
Detailed Description
Bell handling utilities for local trigonomatric transforms.
Summary:
- dualabell converts a bell to its dual bell
- bell_1size_init computes values for a given interval and overlap.
- fold_e_e_1s folds (or unfolds) a function (after belling) even on both sides.
- fold_e_o_1s folds (or unfolds) a function (after belling) even on left and odd on right.
Function Documentation
void bell_1size_init |
( |
REAL * |
bellout, |
|
|
REAL(*)(int, int) |
whichbell, |
|
|
int |
lapleft, |
|
|
int |
center, |
|
|
int |
lapright, |
|
|
int |
dual_flag |
|
) |
| |
Computes bell values for a given size and overlap configuration.
INPUTS:
- whichbell -- a pointer to a bell function. The bells have the form bell(laplength,t) with
- laplength -- the number of POINTS the bell spills out of the interval. It also spills in an equal number of points. Thus the bell takes 2*laplength points to rise from 0 to 1.
- t -- Which point you want to evaluate the bell at. This should range from 0 to 2*laplength-1. bell(laplength,0)=~0 then it rises until bell(laplength,2*laplength-1)=~1 The edge of the interval is between points, at t=(laplength-1) +0.5 The bell function returns a REAL which is the bell's value at that point.
- lapleft -- the laplength to use at the left edge
- center -- the main interval length. must be at least lapleft+lapright. If it is longer than this, the bell is given value 1 on the extra portion
- lapright-- the laplength to use at the right edge
- dual_flag -- a flag for if we should make the dual of the input bell. Use for inverting bi-orthogonal bells
- 0 (or !=1) -- normal, don't dual
- 1 -- make the dual
OUTPUT: bellout --is written onto. The first lapleft+center+lapright entries are used.
Generally, the bell will look like
---------------------\
_____/ -\______
_________/---- - ___
___/--- \-
/-- \
|---------------|--------------|--------------------|--------|--------|
lapleft | lapleft lapright|lapright
|- - - - - - - - - center - - - - - - - - - -|
NOTES:
- It is legal to have lapleft and or lapright equal to zero
- We could call memory internally, but we allow the user to try to localize memory.
Return the value of the dual to the given bell.
INPUTS:
- origbell - pointer to the original bell, e.g. bellmat5.
- laplength-- the number of POINTS the bell spills out of the interval. It also spills in an equal number of points. Thus the bell takes 2*laplength points to rise from 0 to 1.
- t -- Which point you want to evaluate the bell at. This should range from 0 to 2*laplength-1. bell(laplength,0)=~0 then it rises until bell(laplength,2*laplength-1)=~1. The edge of the interval is between points, at t=(laplength-1) +0.5
OUTPUT: return the REAL value at that point.
Computes the folded version of a function, which is then usually DCTed also can unfold
INPUTS:
- coef -- a pointer to the left edge of the array for the folded function "coefficients"
- fcn -- a pointer to the left end of the main interval
- numpts -- the length of the main interval
- left -- a pointer to the right edge of the interval that sits to the left of the main interval left will be called with negative indices
- n_left-- the length of left to use. The bell spills this much into left, and the same amount into fcn.
- right -- a pointer to the left edge of the interval that sits to the right of the main interval
- n_right-- the length of right to use. The bell spills this much into right, and the same amount into fcn.
- bell --- an array containing the bell values
- dir -- which operation to do:
OUTPUT:
- if dir==1: coef -- the folded version of the function. length numpts is written on
- if dir==-1: fcn,left,right -- the unfolded version of the function is ADDED to these arrays
- else : no action
NOTES:
- If all the data is contiguous, we will have right=fcn+numpts and left=fcn-1;
- We could incorporate a skip if the data is transposed.
Computes the folded version of a function, which is then usually LCTed also can unfold.
INPUTS:
- coef -- a pointer to the left edge of the array for the folded function "coefficients"
- fcn -- a pointer to the left end of the main interval
- numpts -- the length of the main interval
- left -- a pointer to the right edge of the interval that sits to the left of the main interval. left will be called with negative indices.
- n_left-- the length of left to use. The bell spills this much into left, and the same amount into fcn.
- right -- a pointer to the left edge of the interval that sits to the right of the main interval
- n_right-- the length of right to use. The bell spills this much into right, and the same amount into fcn.
- bell --- an array containing the bell values
- dir -- which operation to do:
OUTPUT:
- if dir==1: coef -- the folded version of the function. length numpts is written on
- if dir==-1: fcn,left,right -- the unfolded version of the function is ADDED to these arrays
- else : no action
NOTES:
- If all the data is contiguous, we will have right=fcn+numpts and left=fcn-1;
- We could incorporate a skip if the data is transposed