File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,25 @@ in package mode, which can be entered by typing `]` in the Julia REPL.
14
14
15
15
## Examples
16
16
17
+ The examples show how to define ` LinearMap ` s. For more details refer to the section on
18
+ [ Types and their constructors] ( @ref ) .
19
+ A linear map is defined by the way it acts on vectors and by its dimensions, potentially
20
+ also by its [ adjoint] ( https://en.wikipedia.org/wiki/Hermitian_adjoint ) action on vectors.
21
+ Some properties of the linear map can be defined explicitly or implicitly.
22
+
17
23
Let
18
24
19
25
``` julia
20
26
A = LinearMap (rand (10 , 10 ))
21
27
B = LinearMap (cumsum, reverse∘ cumsum∘ reverse, 10 )
22
28
```
23
29
24
- be a matrix- and function-based linear map, respectively. Then the following code just works,
25
- indistinguishably from the case when ` A ` and ` B ` are both ` AbstractMatrix ` -typed objects.
30
+ be a matrix- and a function-based linear map, respectively. For ` A ` all properties are
31
+ inferred from the input matrix; for ` B ` the action, the adjoint action and its dimensions
32
+ (for a single number, the dimension is taken as square) are defined explicitly.
33
+ Given the above the following code just works, indistinguishably from the case when ` A ` and
34
+ ` B ` are both ` AbstractMatrix ` -typed objects, yet giving lazy, ` LinearMap ` -typed objects
35
+ whose action on vectors corresponds to the otherwise expected matrix-vector multiplication.
26
36
27
37
``` julia
28
38
3.0 A + 2 B
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ kronsum
76
76
LinearMaps.:⊕
77
77
```
78
78
79
+ The common use case of rank-1 matrices/operators with image spanning vector ` u ` and
80
+ projection vector ` v ` is readily available as ` u ⊗ v' ` or ` u ⊗ transpose(v) ` .
81
+
79
82
There exist alternative constructors of Kronecker products and sums for square factors and
80
83
summands, respectively. These are designed for cases of 3 or more arguments, and
81
84
benchmarking intended use cases for comparison with ` KroneckerMap ` and ` KroneckerSumMap `
You can’t perform that action at this time.
0 commit comments