Skip to content

Commit c8c2d22

Browse files
Documentation Update (#209)
Co-authored-by: Daniel Karrasch <[email protected]>
1 parent 65eb422 commit c8c2d22

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

docs/src/index.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,25 @@ in package mode, which can be entered by typing `]` in the Julia REPL.
1414

1515
## Examples
1616

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+
1723
Let
1824

1925
```julia
2026
A = LinearMap(rand(10, 10))
2127
B = LinearMap(cumsum, reversecumsumreverse, 10)
2228
```
2329

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.
2636

2737
```julia
2838
3.0A + 2B

docs/src/types.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ kronsum
7676
LinearMaps.:⊕
7777
```
7878

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+
7982
There exist alternative constructors of Kronecker products and sums for square factors and
8083
summands, respectively. These are designed for cases of 3 or more arguments, and
8184
benchmarking intended use cases for comparison with `KroneckerMap` and `KroneckerSumMap`

0 commit comments

Comments
 (0)