Package edu.jas.root
Class RootUtil
java.lang.Object
edu.jas.root.RootUtil
Real root utilities. For example real root count.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseInterval
(RingFactory<C> fac, String s) Parse interval for a real root from String.parseRectangle
(RingFactory<Complex<C>> fac, String s) Parse rectangle for a complex root from String.static <C extends RingElem<C>>
longCount changes in sign.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug
-
-
Constructor Details
-
RootUtil
public RootUtil()
-
-
Method Details
-
signVar
Count changes in sign.- Type Parameters:
C
- coefficient type.- Parameters:
L
- list of coefficients.- Returns:
- number of sign changes in L.
-
parseInterval
public static <C extends RingElem<C> & Rational> Interval<C> parseInterval(RingFactory<C> fac, String s) Parse interval for a real root from String.- Parameters:
s
- String, syntax: [left, right] or [mid].- Returns:
- Interval from s.
-
parseRectangle
public static <C extends RingElem<C> & Rational> Rectangle<C> parseRectangle(RingFactory<Complex<C>> fac, String s) Parse rectangle for a complex root from String.- Parameters:
s
- String, syntax: [south-west, north-east] or [mid].- Returns:
- Interval from s.
-