|
1 | 1 | """
|
2 | 2 | RowVector(vector)
|
3 | 3 |
|
4 |
| -A lazy-view wrapper of an `AbstractVector`, which turns a length-`n` vector into |
5 |
| -a `1×n` shaped row vector and represents the transpose of a vector (the elements |
6 |
| -are also transposed recursively). This type is usually constructed (and |
7 |
| -unwrapped) via the `transpose()` function or `.'` operator (or related |
8 |
| -`ctranspose()` or `'` operator). |
9 |
| -
|
10 |
| -By convention, a vector can be multiplied by a matrix on its left (`A * v`) |
11 |
| -whereas a row vector can be multiplied by a matrix on its right (such that |
12 |
| -`v.' * A = (A.' * v).'`). It differs from a `1×n`-sized matrix by the facts that |
13 |
| -its transpose returns a vector and the inner product `v1.' * v2` returns a |
14 |
| -scalar, but will otherwise behave similarly. |
| 4 | +A lazy-view wrapper of an `AbstractVector`, which turns a length-`n` vector into a `1×n` |
| 5 | +shaped row vector and represents the transpose of a vector (the elements are also transposed |
| 6 | +recursively). This type is usually constructed (and unwrapped) via the [`transpose`](@ref) |
| 7 | +function or `.'` operator (or related [`ctranspose`](@ref) or `'` operator). |
| 8 | +
|
| 9 | +By convention, a vector can be multiplied by a matrix on its left (`A * v`) whereas a row |
| 10 | +vector can be multiplied by a matrix on its right (such that `v.' * A = (A.' * v).'`). It |
| 11 | +differs from a `1×n`-sized matrix by the facts that its transpose returns a vector and the |
| 12 | +inner product `v1.' * v2` returns a scalar, but will otherwise behave similarly. |
15 | 13 | """
|
16 | 14 | immutable RowVector{T,V<:AbstractVector} <: AbstractMatrix{T}
|
17 | 15 | vec::V
|
@@ -89,7 +87,19 @@ parent(rowvec::RowVector) = rowvec.vec
|
89 | 87 | """
|
90 | 88 | conj(rowvector)
|
91 | 89 |
|
92 |
| -Returns a `ConjArray` lazy view of the input, where each element is conjugated. |
| 90 | +Returns a [`ConjArray`](@ref) lazy view of the input, where each element is conjugated. |
| 91 | +
|
| 92 | +### Example |
| 93 | +
|
| 94 | +```jldoctest |
| 95 | +julia> v = [1+im, 1-im].' |
| 96 | +1×2 RowVector{Complex{Int64},Array{Complex{Int64},1}}: |
| 97 | + 1+1im 1-1im |
| 98 | +
|
| 99 | +julia> conj(v) |
| 100 | +1×2 RowVector{Complex{Int64},ConjArray{Complex{Int64},1,Array{Complex{Int64},1}}}: |
| 101 | + 1-1im 1+1im |
| 102 | +``` |
93 | 103 | """
|
94 | 104 | @inline conj(rowvec::RowVector) = RowVector(_conj(rowvec.vec))
|
95 | 105 | @inline conj{T<:Real}(rowvec::RowVector{T}) = rowvec
|
|
0 commit comments