Fixed comments
This commit is contained in:
parent
1784e41c0f
commit
44caf3e21c
|
@ -114,8 +114,7 @@ begin
|
||||||
Result := BisectIsolation(APolynomial, boundExp);
|
Result := BisectIsolation(APolynomial, boundExp);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// This is adapted from
|
// This is adapted from https://en.wikipedia.org/wiki/Real-root_isolation#Bisection_method
|
||||||
// https://en.wikipedia.org/wiki/Real-root_isolation#Bisection_method
|
|
||||||
class function TPolynomialRoots.BisectIsolation(constref APolynomial: TBigIntPolynomial; constref ABoundExp: Cardinal;
|
class function TPolynomialRoots.BisectIsolation(constref APolynomial: TBigIntPolynomial; constref ABoundExp: Cardinal;
|
||||||
const AFindIntegers: Boolean): TIsolatingIntervalArray;
|
const AFindIntegers: Boolean): TIsolatingIntervalArray;
|
||||||
type
|
type
|
||||||
|
@ -154,9 +153,6 @@ begin
|
||||||
|
|
||||||
varq := item.P.RevertOrderOfCoefficients.TranslateVariableByOne;
|
varq := item.P.RevertOrderOfCoefficients.TranslateVariableByOne;
|
||||||
v := varq.CalcSignVariations;
|
v := varq.CalcSignVariations;
|
||||||
//WriteLn;
|
|
||||||
//WriteLn('var((x+1)^n*q(1/(x+1))): ', v);
|
|
||||||
|
|
||||||
if (v > 1)
|
if (v > 1)
|
||||||
or ((v = 1) and AFindIntegers and (item.K < ABoundExp)) then
|
or ((v = 1) and AFindIntegers and (item.K < ABoundExp)) then
|
||||||
begin
|
begin
|
||||||
|
@ -173,7 +169,6 @@ begin
|
||||||
else if v = 1 then
|
else if v = 1 then
|
||||||
begin
|
begin
|
||||||
// Found isolating interval.
|
// Found isolating interval.
|
||||||
//WriteLn('Found isolating interval (' + IntToStr(item.C) + ', ' + IntToStr(item.K) + ', 1).');
|
|
||||||
iso.Add(CreateIsolatingInterval(item.C, item.K, 1, ABoundExp));
|
iso.Add(CreateIsolatingInterval(item.C, item.K, 1, ABoundExp));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue