Other Helpful Functions
StructuralIdentifiability.compare_rational_func_by
StructuralIdentifiability.decompose_derivative
StructuralIdentifiability.dennums_to_fractions
StructuralIdentifiability.eval_at_dict
StructuralIdentifiability.extract_coefficients
StructuralIdentifiability.fractions_to_dennums
StructuralIdentifiability.gen_tag_name
StructuralIdentifiability.jacobian
StructuralIdentifiability.make_substitution
StructuralIdentifiability.parent_ring_change
StructuralIdentifiability.replace_with_ic
StructuralIdentifiability.select_pivots
StructuralIdentifiability.switch_ring
StructuralIdentifiability.uncertain_factorization
StructuralIdentifiability.compare_rational_func_by
— Methodcompare_rational_func_by(f, g, by)
Returns
-1
iff < g
,0
iff = g
, and1
iff > g
.
Functions' numerators and denominators are compared using by
.
StructuralIdentifiability.decompose_derivative
— Methoddecompose_derivative(varname, prefixes)
Determines if it is possible to represent the varname
as a_number
where a
is an element of prefixes
If yes, returns a pair (a, number)
, otherwise nothing
StructuralIdentifiability.dennums_to_fractions
— Methoddennums_to_fractions(dennums)
Returns the field generators represented by fractions.
Input: an array of arrays of polynomials, as in [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]
Output: an array of fractions [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]
StructuralIdentifiability.eval_at_dict
— Methodeval_at_dict(f, d)
Evaluates a polynomial/rational function on a dictionary of type var => val
and missing values are replaced with zeroes
StructuralIdentifiability.extract_coefficients
— Methodextract_coefficients(poly, variables)
Input:
poly
- multivariate polynomialvariables
- a list of variables from the generators of the ring ofpoly
Output:
- dictionary with keys being tuples of length
length(variables)
and values being polynomials in the variables other than those which are the coefficients at the corresponding monomials (in a smaller polynomial ring)
StructuralIdentifiability.fractions_to_dennums
— Methodfractions_to_dennums(fractions)
Returns the field generators represented by lists of denominators and numerators.
Input: an array of fractions, as in [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]
Output: an array of arrays of polynomials, [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]
StructuralIdentifiability.gen_tag_name
— Functiongen_tag_name(base; stop_words)
gen_tag_names(n, base; stop_words)
Generates a string which will not collide with the words in stop_words
.
Arguments
n
: Generates a sequence of unique strings of lengthn
base
: A string or a vector of strings, the base for the generated sequencestop_words
: A vector of strings, stop words
StructuralIdentifiability.jacobian
— Methodjacobian(ratfuncs, point)
Computes the evaluation of the jacobian of ratfuncs
at point point
StructuralIdentifiability.make_substitution
— Methodmake_substitution(f, var_sub, val_numer, val_denom)
Substitute a variable in a polynomial with an expression
Input:
f
- the polynomialvar_sub
- the variable to be substitutedvar_numer
- numerator of the substitution expressionvar_denom
- denominator of the substitution expression
Output:
polynomial
- result of substitution
StructuralIdentifiability.parent_ring_change
— Methodparent_ring_change(poly, new_ring)
Converts a polynomial to a different polynomial ring Input
poly
- a polynomial to be convertednew_ring
- a polynomial ring such that every variable name appearing in poly appears among the generators
Output:
- a polynomial in
new_ring
“equal” topoly
StructuralIdentifiability.replace_with_ic
— Methodreplace_with_ic(ode::ODE, funcs)
Takes an ode and a list of functions in the states and parameters and makes a change of variable names x(t) -> x(0)
. Function is used to prepare the output for the case of known initial conditions
StructuralIdentifiability.select_pivots
— Methodselect_pivots(M::MatElem)
Takes as input a matrix M in the reduced row echelon form and returns tow lists: of the pivot indices and the non-pivot ones
StructuralIdentifiability.switch_ring
— Methodswitch_ring(v, ring)
For a variable v
, returns a variable in ring
with the same name
StructuralIdentifiability.uncertain_factorization
— Methoduncertain_factorization(f)
Input:
f
- polynomial with rational coefficients
Output:
- list of pairs
(div, certainty)
wherediv
's are divisors off
such thatf
is their product with certain powers- if
certainty
is true,div
is $Q$-irreducible