Skip to content

Commit

Permalink
renames rows -> nrows and cols -> ncols
Browse files Browse the repository at this point in the history
  • Loading branch information
heiderich authored and thofma committed Jan 31, 2019
1 parent 1680923 commit e909e61
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 305 deletions.
8 changes: 4 additions & 4 deletions docs/src/matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ manipulate matrices and to set and retrieve entries and other basic data associa
with the matrices.

```@docs
rows(::MatElem)
nrows(::MatElem)
```

```@docs
cols(::MatElem)
ncols(::MatElem)
```

**Examples**
Expand All @@ -182,8 +182,8 @@ S = MatrixSpace(R, 3, 3)
A = S([t + 1 t R(1); t^2 t t; R(-2) t + 2 t^2 + t + 1])
B = S([R(2) R(3) R(1); t t + 1 t + 2; R(-1) t^2 t^3])

r = rows(B)
c = cols(B)
r = nrows(B)
c = ncols(B)
M = A + B
N = 2 + A
M1 = deepcopy(A)
Expand Down
8 changes: 4 additions & 4 deletions docs/src/matrix_spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ F = similar(M)
### Basic manipulation of matrices

```julia
rows(f::MyMat{T}) where T <: AbstractAlgebra.RingElem
nrows(f::MyMat{T}) where T <: AbstractAlgebra.RingElem
```

Return the number of rows of the given matrix.

```julia
cols(f::MyMat{T}) where T <: AbstractAlgebra.RingElem
ncols(f::MyMat{T}) where T <: AbstractAlgebra.RingElem
```

Returns the number of columns of the given matrix.
Expand All @@ -204,8 +204,8 @@ in place and not returned from the function.
```julia
M = matrix(ZZ, BigInt[2 3 0; 1 1 1])

m = rows(M)
n = cols(M)
m = nrows(M)
n = ncols(M)
M[1, 2] = BigInt(4)
c = M[1, 1]
```
Expand Down
8 changes: 4 additions & 4 deletions src/AbstractAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ import .Generic: add!, addeq!, addmul!, base_ring, cached,
character, characteristic, charpoly, charpoly_danilevsky!,
charpoly_danilevsky_ff!, charpoly_hessenberg!, chebyshev_t,
chebyshev_u, _check_dim, check_parent,
codomain, coeff, coeffs, cols,
codomain, coeff, coeffs, ncols,
combine_like_terms!, compose, content, cycles,
data, deflate, deflation, degree, degrees,
derivative, det, det_clow,
Expand Down Expand Up @@ -157,7 +157,7 @@ import .Generic: add!, addeq!, addmul!, base_ring, cached,
resultant_ducos, resultant_euclidean,
resultant_subresultant, resultant_sylvester, resx,
retraction_map, reverse,
rows, rref, rref!, section_map, setcoeff!, set_exponent_vector!,
nrows, rref, rref!, section_map, setcoeff!, set_exponent_vector!,
set_field!, set_length!, set_limit!, setpermstyle,
set_prec!, set_val!, size, shift_left,
shift_right, show_minus_one,
Expand All @@ -176,7 +176,7 @@ export add!, addeq!, addmul!, addmul_delayed_reduction!, base_ring, cached,
characteristic, charpoly, charpoly_danilevsky!,
charpoly_danilevsky_ff!, charpoly_hessenberg!, chebyshev_t,
chebyshev_u, _check_dim, check_parent,
codomain, coeff, coeffs, cols,
codomain, coeff, coeffs, ncols,
combine_like_terms!, compose, content, cycles,
data, deflate, deflation, degree, degrees,
derivative, det, det_clow,
Expand Down Expand Up @@ -223,7 +223,7 @@ export add!, addeq!, addmul!, addmul_delayed_reduction!, base_ring, cached,
resultant_ducos, rescale!, resultant_euclidean,
resultant_subresultant,
resultant_sylvester, resx, retraction_map,
reverse, rows, rref, rref!,
reverse, nrows, rref, rref!,
section_map, setcoeff!, set_exponent_vector!, set_field!, set_length!,
set_limit!, setpermstyle, set_prec!, set_val!,
shift_left, shift_right, show_minus_one, similarity!, size,
Expand Down
4 changes: 2 additions & 2 deletions src/generic/GenericTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,8 @@ end

# not really a mathematical ring
mutable struct MatSpace{T <: RingElement} <: AbstractAlgebra.MatSpace{T}
rows::Int
cols::Int
nrows::Int
ncols::Int
base_ring::Ring

function MatSpace{T}(R::Ring, r::Int, c::Int, cached::Bool = true) where T <: RingElement
Expand Down
Loading

0 comments on commit e909e61

Please sign in to comment.