@@ -45,7 +45,7 @@ list_properties() = collect(values(PROPERTIES))
45
45
Check properties types are valid, i.e., are subtypes of `PropertyTypes.AbstractProperty`.
46
46
47
47
# Examples
48
- ```jldoctest
48
+ ```julia-repl
49
49
julia> check_propertie_types(PropertyTypes.Symmetric, PropertyTypes.Inverse)
50
50
51
51
julia> check_propertie_types(Int)
64
64
Check properties exists.
65
65
66
66
# Examples
67
- ```jldoctest
67
+ ```julia-repl
68
68
julia> check_properties_exists(Property(:symmetric), Property(:inverse))
69
69
70
70
julia> check_properties_exists(Property(:symmetric), Property(:notexists))
83
83
Convert property types to properties.
84
84
85
85
# Examples
86
- ```jldoctest
86
+ ```julia-repl
87
87
julia> property_types_to_properties(PropertyTypes.Symmetric, PropertyTypes.Inverse)
88
88
2-element Vector{Property}:
89
89
Property(:symmetric)
100
100
101
101
Register properties for a type. The properties are a vector of symbols.
102
102
103
+ See also: [`properties`](@ref).
104
+
103
105
# Examples
104
106
```jldoctest
105
- julia> @properties SymTridiagonal [:symmetric, :inverse, :illcond, :posdef, :eigen]
107
+ julia> @properties Matrix [:symmetric, :inverse, :illcond, :posdef, :eigen]
106
108
```
107
109
"""
108
110
macro properties (type:: Symbol , ex:: Expr )
@@ -119,20 +121,20 @@ Register properties for a type.
119
121
See also: [`@properties`](@ref).
120
122
121
123
# Examples
122
- ```jldoctest
123
- julia> register_properties(SymTridiagonal , [Property(:symmetric), Property(:inverse), Property(:illcond), Property(:posdef), Property(:eigen)])
124
+ ```julia-repl
125
+ julia> register_properties(Matrix , [Property(:symmetric), Property(:inverse), Property(:illcond), Property(:posdef), Property(:eigen)])
124
126
125
- julia> register_properties(SymTridiagonal , Property(:symmetric), Property(:inverse), Property(:illcond), Property(:posdef), Property(:eigen))
127
+ julia> register_properties(Matrix , Property(:symmetric), Property(:inverse), Property(:illcond), Property(:posdef), Property(:eigen))
126
128
127
- julia> register_properties(SymTridiagonal , [:symmetric, :inverse, :illcond, :posdef, :eigen])
129
+ julia> register_properties(Matrix , [:symmetric, :inverse, :illcond, :posdef, :eigen])
128
130
129
- julia> register_properties(SymTridiagonal , PropertyTypes.Symmetric, PropertyTypes.Inverse, PropertyTypes.IllCond, PropertyTypes.PosDef, PropertyTypes.Eigen)
131
+ julia> register_properties(Matrix , PropertyTypes.Symmetric, PropertyTypes.Inverse, PropertyTypes.IllCond, PropertyTypes.PosDef, PropertyTypes.Eigen)
130
132
131
- julia> register_properties(SymTridiagonal , [PropertyTypes.Symmetric, PropertyTypes.Inverse, PropertyTypes.IllCond, PropertyTypes.PosDef, PropertyTypes.Eigen])
133
+ julia> register_properties(Matrix , [PropertyTypes.Symmetric, PropertyTypes.Inverse, PropertyTypes.IllCond, PropertyTypes.PosDef, PropertyTypes.Eigen])
132
134
133
- julia> register_properties(SymTridiagonal , PropertyTypes.Symmetric(), PropertyTypes.Inverse(), PropertyTypes.IllCond(), PropertyTypes.PosDef(), PropertyTypes.Eigen())
135
+ julia> register_properties(Matrix , PropertyTypes.Symmetric(), PropertyTypes.Inverse(), PropertyTypes.IllCond(), PropertyTypes.PosDef(), PropertyTypes.Eigen())
134
136
135
- julia> register_properties(SymTridiagonal , [PropertyTypes.Symmetric(), PropertyTypes.Inverse(), PropertyTypes.IllCond(), PropertyTypes.PosDef(), PropertyTypes.Eigen()])
137
+ julia> register_properties(Matrix , [PropertyTypes.Symmetric(), PropertyTypes.Inverse(), PropertyTypes.IllCond(), PropertyTypes.PosDef(), PropertyTypes.Eigen()])
136
138
```
137
139
"""
138
140
function register_properties (T:: Type , props:: Vector{Property} )
@@ -161,21 +163,21 @@ register_properties(T::Type, props::Vector{PropertyTypes.AbstractProperty}) = re
161
163
162
164
Get the properties of a type or matrix.
163
165
166
+ See also: [`@properties`](@ref).
167
+
164
168
# Examples
165
169
```jldoctest
166
- julia> properties(Minij)
167
- 4-element Vector{Property}:
170
+ julia> @properties Matrix [:symmetric, :posdef]
171
+
172
+ julia> properties(Matrix)
173
+ 2-element Vector{Property}:
168
174
Property(:symmetric)
169
- Property(:inverse)
170
175
Property(:posdef)
171
- Property(:eigen)
172
176
173
- julia> properties(Minij(5 ))
174
- 4 -element Vector{Property}:
177
+ julia> properties(Matrix(ones(1, 1) ))
178
+ 2 -element Vector{Property}:
175
179
Property(:symmetric)
176
- Property(:inverse)
177
180
Property(:posdef)
178
- Property(:eigen)
179
181
"""
180
182
properties (:: Type{<:AbstractMatrix} ):: Vector{Property} = []
181
183
properties (m:: AbstractMatrix ) = properties (typeof (m))
0 commit comments