@@ -48,7 +48,7 @@ LinearAlgebra.isposdef(::LinearMap) = false # default assumptions
48
48
49
49
Base. ndims (:: LinearMap ) = 2
50
50
Base. size (A:: LinearMap , n) =
51
- (n== 1 || n== 2 ? size (A)[n] : error (" LinearMap objects have only 2 dimensions" ))
51
+ (n == 1 || n == 2 ? size (A)[n] : error (" LinearMap objects have only 2 dimensions" ))
52
52
Base. length (A:: LinearMap ) = size (A)[1 ] * size (A)[2 ]
53
53
54
54
# check dimension consistency for multiplication A*B
@@ -267,24 +267,27 @@ include("show.jl") # show methods for LinearMap objects
267
267
268
268
Construct a linear map object, either from an existing `LinearMap` or `AbstractVecOrMat` `A`,
269
269
with the purpose of redefining its properties via the keyword arguments `kwargs`;
270
- a `UniformScaling` object `J` with specified (square) dimension `M`; from a `Number`
271
- object to lazily represent filled matrices; or
270
+ a `UniformScaling` object `J` with specified (square) dimension `M`; or
272
271
from a function or callable object `f`. In the latter case, one also needs to specify
273
272
the size of the equivalent matrix representation `(M, N)`, i.e., for functions `f` acting
274
273
on length `N` vectors and producing length `M` vectors (with default value `N=M`).
275
274
Preferably, also the `eltype` `T` of the corresponding matrix representation needs to be
276
- specified, i.e. whether the action of `f` on a vector will be similar to, e.g., multiplying
275
+ specified, i.e., whether the action of `f` on a vector will be similar to, e.g., multiplying
277
276
by numbers of type `T`. If not specified, the devault value `T=Float64` will be assumed.
278
277
Optionally, a corresponding function `fc` can be specified that implements the adjoint
279
278
(=transpose in the real case) of `f`.
280
279
281
280
The keyword arguments and their default values for the function-based constructor are:
282
- * `issymmetric::Bool = false` : whether `A` or `f` acts as a symmetric matrix
283
- * `ishermitian::Bool = issymmetric & T<:Real` : whether `A` or `f` acts as a Hermitian
281
+ * `issymmetric::Bool = false` : whether `A` or `f` act as a symmetric matrix
282
+ * `ishermitian::Bool = issymmetric & T<:Real` : whether `A` or `f` act as a Hermitian
284
283
matrix
285
- * `isposdef::Bool = false` : whether `A` or `f` acts as a positive definite matrix.
284
+ * `isposdef::Bool = false` : whether `A` or `f` act as a positive definite matrix.
286
285
For existing linear maps or matrices `A`, the default values will be taken by calling
287
- `issymmetric`, `ishermitian` and `isposdef` on the existing object `A`.
286
+ internal functions `_issymmetric`, `_ishermitian` and `_isposdef` on the existing object `A`.
287
+ These in turn dispatch to (overloads of) `LinearAlgebra`'s `issymmetric`, `ishermitian`,
288
+ and `isposdef` methods whenever these checks are expected to be computationally cheap or even
289
+ known at compile time as for certain structured matrices, but return `false` for generic
290
+ `AbstractMatrix` types.
288
291
289
292
For the function-based constructor, there is one more keyword argument:
290
293
* `ismutating::Bool` : flags whether the function acts as a mutating matrix multiplication
0 commit comments