|
14 | 14 |
|
15 | 15 | # FIXME remove after deprecation period for merge/labels/height/method
|
16 | 16 | Base.propertynames(hclu::Hclust, private::Bool = false) =
|
17 |
| - (:merges, :heights, :order, :linkage, |
| 17 | + (fieldnames(hclu)..., |
18 | 18 | #= deprecated as of 0.12 =# :height, :labels, :merge, :method)
|
19 | 19 |
|
20 | 20 | # FIXME remove after deprecation period for merge/labels/height/method
|
21 | 21 | @inline function Base.getproperty(hclu::Hclust, prop::Symbol)
|
22 |
| - if prop === :height |
| 22 | + if prop === :height # deprecated as of 0.12 |
23 | 23 | Base.depwarn("Hclust::height is deprecated, use Hclust::heights", Symbol("Hclust::height"))
|
24 | 24 | return getfield(hclu, :heights)
|
25 |
| - elseif prop === :labels |
| 25 | + elseif prop === :labels # deprecated as of 0.12 |
26 | 26 | Base.depwarn("Hclust::labels is deprecated and will be removed in future versions", Symbol("Hclust::labels"))
|
27 | 27 | return 1:nnodes(hclu)
|
28 |
| - elseif prop === :merge |
| 28 | + elseif prop === :merge # deprecated as of 0.12 |
29 | 29 | Base.depwarn("Hclust::merge is deprecated, use Hclust::merges", Symbol("Hclust::merge"))
|
30 | 30 | return getfield(hclu, :merges)
|
31 |
| - elseif prop === :method |
| 31 | + elseif prop === :method # deprecated as of 0.12 |
32 | 32 | Base.depwarn("Hclust::method is deprecated, use Hclust::linkage", Symbol("Hclust::method"))
|
33 | 33 | return getfield(hclu, :linkage)
|
34 | 34 | else
|
|
38 | 38 |
|
39 | 39 | # FIXME remove after deprecation period for cweights
|
40 | 40 | Base.propertynames(clu::KmeansResult, private::Bool = false) =
|
41 |
| - (:centers, :assignments, :costs, :counts, :wcounts, |
42 |
| - :totalcost, :iterations, :converged, |
43 |
| - #= deprecated as of 0.13.2 =# :cweights) |
| 41 | + (fieldnames(clu)..., #= deprecated as of 0.13.2 =# :cweights) |
44 | 42 |
|
45 | 43 | # FIXME remove after deprecation period for cweights
|
46 | 44 | @inline function Base.getproperty(clu::KmeansResult, prop::Symbol)
|
47 |
| - if prop === :cweights |
| 45 | + if prop === :cweights # deprecated as of 0.13.2 |
48 | 46 | Base.depwarn("KmeansResult::cweights is deprecated, use wcounts(clu::KmeansResult)",
|
49 | 47 | Symbol("KmeansResult::cweights"))
|
50 | 48 | return clu.wcounts
|
51 | 49 | else
|
52 | 50 | return getfield(clu, prop)
|
53 | 51 | end
|
54 | 52 | end
|
| 53 | + |
| 54 | +# FIXME remove after deprecation period for acosts |
| 55 | +Base.propertynames(kmed::KmedoidsResult, private::Bool = false) = |
| 56 | + (fieldnames(kmed)..., #= deprecated since v0.13.4=# :acosts) |
| 57 | + |
| 58 | +# FIXME remove after deprecation period for acosts |
| 59 | +function Base.getproperty(kmed::KmedoidsResult, prop::Symbol) |
| 60 | + if prop == :acosts # deprecated since v0.13.4 |
| 61 | + Base.depwarn("KmedoidsResult::acosts is deprecated, use KmedoidsResult::costs", |
| 62 | + Symbol("KmedoidsResult::costs")) |
| 63 | + return getfield(kmed, :costs) |
| 64 | + else |
| 65 | + return getfield(kmed, prop) |
| 66 | + end |
| 67 | +end |
0 commit comments