Skip to content

Commit

Permalink
Rename number_of_* functions (#3272)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Jan 30, 2024
1 parent 2e151d3 commit 733dfc2
Show file tree
Hide file tree
Showing 120 changed files with 689 additions and 633 deletions.
4 changes: 2 additions & 2 deletions docs/src/Combinatorics/graphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ complete_bipartite_graph(n::Int64, m::Int64)
edges(g::Graph{T}) where {T <: Union{Directed, Undirected}}
has_edge(g::Graph{T}, source::Int64, target::Int64) where {T <: Union{Directed, Undirected}}
has_vertex(g::Graph{T}, v::Int64) where {T <: Union{Directed, Undirected}}
number_of_edges(g::Graph{T}) where {T <: Union{Directed, Undirected}}
number_of_vertices(g::Graph{T}) where {T <: Union{Directed, Undirected}}
inneighbors(g::Graph{T}, v::Int64) where {T <: Union{Directed, Undirected}}
ne(g::Graph{T}) where {T <: Union{Directed, Undirected}}
neighbors(g::Graph{T}, v::Int64) where {T <: Union{Directed, Undirected}}
nv(g::Graph{T}) where {T <: Union{Directed, Undirected}}
outneighbors(g::Graph{T}, v::Int64) where {T <: Union{Directed, Undirected}}
shortest_path_dijkstra
is_isomorphic(g1::Graph{T}, g2::Graph{T}) where {T <: Union{Directed, Undirected}}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Combinatorics/matroids.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ is_clutter(sets::AbstractVector{T}) where T <: GroundsetType
is_regular(M::Matroid)
is_binary(M::Matroid)
is_ternary(M::Matroid)
n_connected_components(M::Matroid)
number_of_connected_components(M::Matroid)
connected_components(M::Matroid)
is_connected(M::Matroid)
loops(M::Matroid)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/Combinatorics/partitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ getindex_safe

```@docs
partitions(::Oscar.IntegerUnion)
num_partitions(::Oscar.IntegerUnion)
number_of_partitions(::Oscar.IntegerUnion)
```

### Partitions with restrictions
Expand Down Expand Up @@ -58,7 +58,7 @@ julia> length(partitions(100,[1,5,10,25,50]))
```@docs
partitions(::T, ::Oscar.IntegerUnion, ::Oscar.IntegerUnion, ::Oscar.IntegerUnion) where T <: Oscar.IntegerUnion
partitions(::T, ::Oscar.IntegerUnion) where T <: Oscar.IntegerUnion
num_partitions(::Oscar.IntegerUnion, ::Oscar.IntegerUnion)
number_of_partitions(::Oscar.IntegerUnion, ::Oscar.IntegerUnion)
partitions(::T, ::Oscar.IntegerUnion, ::Vector{T}, ::Vector{S}) where {T <: Oscar.IntegerUnion, S<:Oscar.IntegerUnion}
partitions(::T, ::Vector{T}, ::Vector{S}) where {T <: Oscar.IntegerUnion, S<:Oscar.IntegerUnion}
partitions(::T, ::Vector{T}) where T <: Oscar.IntegerUnion
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Combinatorics/simplicialcomplexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ complex_projective_plane()
## Basic properties

```@docs
nvertices(K::SimplicialComplex)
number_of_vertices(K::SimplicialComplex)
dim(K::SimplicialComplex)
f_vector(K::SimplicialComplex)
h_vector(K::SimplicialComplex)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Combinatorics/tableaux.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ semistandard_tableaux
```@docs
is_standard
standard_tableaux
num_standard_tableaux
number_of_standard_tableaux
schensted
bump!
```
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For a concrete instance, the constructors to be implemented are:
ideal(W::AbsLocalizedRing, v::Vector{LocalizedRingElemType}) where {LocalizedRingElemType<:AbsLocalizedRingElem}
```

The usual getter functions `base_ring`, `gens`, `ngens`, and `gen` must be realized.
The usual getter functions `base_ring`, `gens`, `number_of_generators`, and `gen` must be realized.

Moreover, a method for ideal membership via the `in` function is required.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ chosen prime number rather than for $I$ itself.
groebner_basis_hilbert_driven(I::MPolyIdeal{P};
destination_ordering::MonomialOrdering,
complete_reduction::Bool = false,
weights::Vector{Int} = ones(Int, ngens(base_ring(I))),
weights::Vector{Int} = ones(Int, number_of_generators(base_ring(I))),
hilbert_numerator::Union{Nothing, ZZPolyRingElem} = nothing) where {P <: MPolyRingElem}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ If `F` is a free `R`-module, then

- `base_ring(F)` refers to `R`,
- `basis(F)`, `gens(F)` to the basis vectors of `F`,
- `rank(F)`, `ngens(F)`, `dim(F)` to the number of these vectors, and
- `rank(F)`, `number_of_generators(F)` / `ngens(F)`, `dim(F)` to the number of these vectors, and
- `F[i]`, `basis(F, i)`, `gen(F, i)` to the `i`-th such vector.

###### Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ If `M` is a subquotient with ambient free `R`-module `F`, then
- `base_ring(M)` refers to `R`,
- `ambient_free_module(M)` to `F`,
- `gens(M)` to the generators of `M`,
- `ngens(M)` to the number of these generators,
- `number_of_generators(M)` / `ngens(M)` to the number of these generators,
- `M[i]`, `gen(M, i)` to the `i`th such generator,
- `ambient_representatives_generators(M)` to the ambient representatives of the generators of `M` in `F`,
- `relations(M)` to the relations of `M`, and
Expand Down Expand Up @@ -118,7 +118,7 @@ julia> gens(M)
x*e[1]
y*e[1]
julia> ngens(M)
julia> number_of_generators(M)
2
julia> gen(M, 2)
Expand Down
8 changes: 4 additions & 4 deletions docs/src/CommutativeAlgebra/affine_algebras.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If `A=R/I` is the quotient of a multivariate polynomial ring `R` modulo an ideal
- `base_ring(A)` refers to `R`,
- `modulus(A)` to `I`,
- `gens(A)` to the generators of `A`,
- `ngens(A)` to the number of these generators, and
- `number_of_generators(A)` / `ngens(A)` to the number of these generators, and
- `gen(A, i)` as well as `A[i]` to the `i`-th such generator.

###### Examples
Expand All @@ -87,7 +87,7 @@ julia> gens(A)
y
z
julia> ngens(A)
julia> number_of_generators(A)
3
julia> gen(A, 2)
Expand Down Expand Up @@ -216,7 +216,7 @@ If `a` is an ideal of the affine algebra `A`, then

- `base_ring(a)` refers to `A`,
- `gens(a)` to the generators of `a`,
- `ngens(a)` to the number of these generators, and
- `number_of_generators(a)` / `ngens(a)` to the number of these generators, and
- `gen(a, i)` as well as `a[i]` to the `i`-th such generator.

###### Examples
Expand All @@ -240,7 +240,7 @@ julia> gens(a)
x - y
z^4
julia> ngens(a)
julia> number_of_generators(a)
2
julia> gen(a, 2)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/CommutativeAlgebra/ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If `I` is an ideal of a multivariate polynomial ring `R`, then

- `base_ring(I)` refers to `R`,
- `gens(I)` to the generators of `I`,
- `ngens(I)` to the number of these generators, and
- `number_of_generators(I)` / `ngens(I)` to the number of these generators, and
- `gen(I, k)` as well as `I[k]` to the `k`-th such generator.

###### Examples
Expand All @@ -51,7 +51,7 @@ julia> gens(I)
x*y
y^2
julia> ngens(I)
julia> number_of_generators(I)
3
julia> gen(I, 2)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/CommutativeAlgebra/localizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ If `I` is an ideal of a localized multivariate polynomial ring `Rloc`, then

- `base_ring(I)` refers to `Rloc`,
- `gens(I)` to the generators of `I`,
- `ngens(I)` to the number of these generators, and
- `number_of_generators(I)` / `ngens(I)` to the number of these generators, and
- `gen(I, k)` as well as `I[k]` to the `k`-th such generator.

Similarly, if `I` is an ideal of a localized quotient of a multivariate polynomial ring.
Expand Down
8 changes: 4 additions & 4 deletions docs/src/CommutativeAlgebra/rings.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ we follow the former book.
asking that $G$ is free and that the degree zero part consists of the constants only (see Theorem 8.6 in [MS05](@cite)).

!!! note
Given a `G`-grading on `R` in OSCAR, we say that `R` is *$\mathbb Z^m$-graded* if `is_free(G) && ngens(G) == rank(G) == m`
Given a `G`-grading on `R` in OSCAR, we say that `R` is *$\mathbb Z^m$-graded* if `is_free(G) && number_of_generators(G) == rank(G) == m`
evaluates to `true`. In this case, conversion routines allow one to switch back and forth between elements
of `G` and integer vectors of length `m`. Specifically, if `R` is *$\mathbb Z$-graded*, that is,
`is_free(G) && ngens(G) == rank(G) == 1` evaluates to `true`, elements of `G` may be converted
`is_free(G) && number_of_generators(G) == rank(G) == 1` evaluates to `true`, elements of `G` may be converted
to integers and vice versa.

### Types
Expand Down Expand Up @@ -292,7 +292,7 @@ Given a multivariate polynomial ring `R` with coefficient ring `C`,

- `coefficient_ring(R)` refers to `C`,
- `gens(R)` to the generators (variables) of `R`,
- `ngens(R)` to the number of these generators, and
- `number_of_generators(R)` / `ngens(R)` to the number of these generators, and
- `gen(R, i)` as well as `R[i]` to the `i`-th such generator.

###### Examples
Expand All @@ -316,7 +316,7 @@ y
julia> R[3]
z
julia> ngens(R)
julia> number_of_generators(R)
3
```
Expand Down
6 changes: 3 additions & 3 deletions docs/src/DeveloperDocumentation/SubObjectIterator.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ Let us look at an example how we can utilize this interface. The following is
the implementation to access the rays of a `Cone`:

```julia
rays(as::Type{RayVector{T}}, C::Cone) where T = SubObjectIterator{as}(pm_object(C), _ray_cone, nrays(C))
rays(as::Type{RayVector{T}}, C::Cone) where T = SubObjectIterator{as}(pm_object(C), _ray_cone, number_of_rays(C))

_ray_cone(::Type{T}, C::Polymake.BigObject, i::Base.Integer) where T = T(C.RAYS[i, :])
```

Typing `r = rays(RayVector{Polymake.Rational}, C)` with a `Cone` `C` returns a
`SubObjectIterator` over `RayVector{Polymake.Rational}` elements of length
`nrays(C)` with access function `_ray_cone`. With the given method of this
`number_of_rays(C)` with access function `_ray_cone`. With the given method of this
function, `getindex(r, i)` returns a `RayVector{Polymake.Rational}` constructed from
the `i-th` row of the property `RAYS` of the `Polymake.BigObject`.

Expand Down Expand Up @@ -177,7 +177,7 @@ implementation by now, but we had different code in between, so let us summarize
and take a look at what the whole implementation actually looks like:

```julia
rays(as::Type{RayVector{T}}, C::Cone) where T = SubObjectIterator{as}(pm_object(C), _ray_cone, nrays(C))
rays(as::Type{RayVector{T}}, C::Cone) where T = SubObjectIterator{as}(pm_object(C), _ray_cone, number_of_rays(C))

_ray_cone(::Type{T}, C::Polymake.BigObject, i::Base.Integer) where T = T(C.RAYS[i, :])

Expand Down
2 changes: 1 addition & 1 deletion docs/src/Groups/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ one(x::GAPGroupElem)
is_finiteorder(x::GAPGroupElem)
gens(::GAPGroup)
has_gens(::GAPGroup)
ngens(G::GAPGroup)
number_of_generators(G::GAPGroup)
gen(::GAPGroup, i::Int)
small_generating_set(G::GAPGroup)
Base.rand(G::GAPGroup)
Expand Down
18 changes: 9 additions & 9 deletions docs/src/Groups/grouplib.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ should be safe to refer to particular (classes of) groups by their index numbers

```@docs
all_transitive_groups
has_number_transitive_groups
has_number_of_transitive_groups
has_transitive_group_identification
has_transitive_groups
number_transitive_groups
number_of_transitive_groups
transitive_group
transitive_group_identification
```
Expand All @@ -41,10 +41,10 @@ TODO: give proper attribution to the primitive groups library (in particular, ci

```@docs
all_primitive_groups
has_number_primitive_groups
has_number_of_primitive_groups
has_primitive_group_identification
has_primitive_groups
number_primitive_groups
number_of_primitive_groups
primitive_group
primitive_group_identification
```
Expand Down Expand Up @@ -76,10 +76,10 @@ not have a faithful permutation representation of small degree.
Computations in these groups may be rather time consuming.

```@docs
has_number_perfect_groups
has_number_of_perfect_groups
has_perfect_group_identification
has_perfect_groups
number_perfect_groups
number_of_perfect_groups
orders_perfect_groups
perfect_group
perfect_group_identification
Expand All @@ -93,10 +93,10 @@ TODO: give proper attribution to the smallgrp package and other things used (in

```@docs
all_small_groups
has_number_small_groups
has_number_of_small_groups
has_small_group_identification
has_small_groups
number_small_groups
number_of_small_groups
small_group
small_group_identification
```
Expand All @@ -111,7 +111,7 @@ corresponding character tables in the library of character tables,
see [`character_table(id::String, p::Int = 0)`](@ref).

```@docs
number_atlas_groups
number_of_atlas_groups
all_atlas_group_infos
atlas_group
atlas_subgroup
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Groups/subgroups.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ normal_closure(G::T, H::T) where T<:GAPGroup
GroupConjClass{T<:GAPGroup, S<:Union{GAPGroupElem,GAPGroup}}
representative(G::GroupConjClass)
acting_group(G::GroupConjClass)
number_conjugacy_classes(G::GAPGroup)
number_of_conjugacy_classes(G::GAPGroup)
conjugacy_class(G::GAPGroup, g::GAPGroupElem)
conjugacy_class(G::T, g::T) where T<:GAPGroup
conjugacy_classes(G::GAPGroup)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/NoncommutativeAlgebra/PBWAlgebras/creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Given a PBW-algebra `A` over a field `K`,

- `coefficient_ring(A)` refers to `K`,
- `gens(A)` to the generators of `A`,
- `ngens(A)` to the number of these generators, and
- `number_of_generators(A)` / `ngens(A)` to the number of these generators, and
- `gen(A, i)` as well as `A[i]` to the `i`-th such generator.

###### Examples
Expand Down Expand Up @@ -95,7 +95,7 @@ y
julia> A[3]
z
julia> ngens(A)
julia> number_of_generators(A)
3
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/NoncommutativeAlgebra/PBWAlgebras/ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If `I` is an ideal of a PBW-algebra `A`, then

- `base_ring(I)` refers to `A`,
- `gens(I)` to the generators of `I`,
- `ngens(I)` to the number of these generators, and
- `number_of_generators(I)` / `ngens(I)` to the number of these generators, and
- `gen(I, k)` as well as `I[k]` to the `k`-th such generator.

###### Examples
Expand All @@ -50,7 +50,7 @@ julia> gens(I)
x
dx
julia> ngens(I)
julia> number_of_generators(I)
2
julia> gen(I, 2)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/NoncommutativeAlgebra/PBWAlgebras/quotients.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ If `Q=A/I` is the quotient ring of a PBW-algebra `A` modulo a two-sided ideal `I
- `base_ring(Q)` refers to `A`,
- `modulus(Q)` to `I`,
- `gens(Q)` to the generators of `Q`,
- `ngens(Q)` to the number of these generators, and
- `number_of_generators(Q)` / `ngens(Q)` to the number of these generators, and
- `gen(Q, i)` as well as `Q[i]` to the `i`-th such generator.

###### Examples
Expand Down Expand Up @@ -80,7 +80,7 @@ julia> gens(Q)
y
z
julia> ngens(Q)
julia> number_of_generators(Q)
3
julia> gen(Q, 2)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/PolyhedralGeometry/Polyhedra/auxiliary.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ relative_interior_point(P::Polyhedron{T}) where T<:scalar_types
## Combinatorial data

```@docs
nfacets(P::Polyhedron)
nvertices(P::Polyhedron)
number_of_facets(P::Polyhedron)
number_of_vertices(P::Polyhedron)
f_vector(P::Polyhedron)
facet_sizes(P::Polyhedron)
g_vector(P::Polyhedron)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/PolyhedralGeometry/cones.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ is_pointed(C::Cone)
is_fulldimensional(C::Cone)
lineality_dim(C::Cone)
lineality_space(C::Cone{T}) where T<:scalar_types
nfacets(C::Cone)
nrays(C::Cone)
number_of_facets(C::Cone)
number_of_rays(C::Cone)
rays(C::Cone{T}) where T<:scalar_types
rays_modulo_lineality(C::Cone{T}) where T<:scalar_types
ray_degrees(C::Cone)
Expand Down
6 changes: 3 additions & 3 deletions docs/src/PolyhedralGeometry/fans.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ lineality_space(PF::PolyhedralFan)
maximal_cones(PF::PolyhedralFan)
cones(PF::PolyhedralFan, cone_dim::Int)
cones(PF::PolyhedralFan)
n_maximal_cones(PF::PolyhedralFan)
n_cones(PF::PolyhedralFan)
nrays(PF::PolyhedralFan)
number_of_maximal_cones(PF::PolyhedralFan)
number_of_cones(PF::PolyhedralFan)
number_of_rays(PF::PolyhedralFan)
rays(PF::PolyhedralFan)
rays_modulo_lineality(PF::PolyhedralFan)
primitive_collections(PF::PolyhedralFan)
Expand Down
Loading

0 comments on commit 733dfc2

Please sign in to comment.