reactor-c
C Runtime for Lingua Franca
|
Functions | |
void | mixed_radix_incr (mixed_radix_int_t *mixed) |
int | mixed_radix_parent (mixed_radix_int_t *mixed, int n) |
int | mixed_radix_to_int (mixed_radix_int_t *mixed) |
Copyright (c) 2022, The University of California at Berkeley.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Functions for permuted mixed-radix numbers used in Lingua Franca programs.
void mixed_radix_incr | ( | mixed_radix_int_t * | mixed | ) |
Increment the mixed radix number by one according to the permutation matrix.
mixed | A pointer to the mixed-radix number. |
int mixed_radix_parent | ( | mixed_radix_int_t * | mixed, |
int | n ) |
Return the int value of a mixed-radix number after dropping the first n digits. If n is larger than or equal to the size of the mixed-radix number, then return 0.
mixed | A pointer to the mixed-radix number. |
n | The number of digits to drop, which is assumed to be greater than or equal to 0. |
int mixed_radix_to_int | ( | mixed_radix_int_t * | mixed | ) |
Return the int value of a mixed-radix number.
mixed | A pointer to the mixed-radix number. |