File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ PMNewtonZeroFinder class >> function: aBlock1 derivative: aBlock2 [
3939 ^ (self new ) setFunction: aBlock1; setDerivative: aBlock2; yourself
4040]
4141
42+ { #category : #information }
43+ PMNewtonZeroFinder class >> rootFindingAlgorithmWith: precision [
44+
45+ | rootFinder |
46+ rootFinder := PMNewtonZeroFinder new .
47+ rootFinder desiredPrecision: precision.
48+ ^ rootFinder
49+ ]
50+
4251{ #category : #operation }
4352PMNewtonZeroFinder >> computeInitialValues [
4453 " Private - If no derivative has been defined, take an ad-hoc definition.
Original file line number Diff line number Diff line change @@ -26,15 +26,6 @@ PMPolynomial class >> coefficients: anArray [
2626 ^ self new initialize: anArray reverse
2727]
2828
29- { #category : #information }
30- PMPolynomial class >> rootFindingAlgorithmWith: precision [
31-
32- | rootFinder |
33- rootFinder := PMNewtonZeroFinder new .
34- rootFinder desiredPrecision: precision.
35- ^ rootFinder
36- ]
37-
3829{ #category : #operation }
3930PMPolynomial >> * aNumberOrPolynomial [
4031
@@ -250,7 +241,7 @@ PMPolynomial >> reciprocal [
250241
251242{ #category : #information }
252243PMPolynomial >> rootFindingAlgorithmWith: precision [
253- ^ self class rootFindingAlgorithmWith: precision
244+ ^ PMNewtonZeroFinder rootFindingAlgorithmWith: precision
254245]
255246
256247{ #category : #information }
You can’t perform that action at this time.
0 commit comments