Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/en/thematic_tutorials/sandpile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4365,7 +4365,7 @@ EXAMPLES::
{0: 2, 1: 3, 2: 1, 3: 2}
sage: n(mean([D.simulate_threshold().deg() for _ in range(10)])) # random
7.10000000000000
sage: n(s.stationary_density()*s.num_verts())
sage: n(s.stationary_density()*s.n_vertices())
6.93750000000000

.. NOTE::
Expand Down
8 changes: 4 additions & 4 deletions src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1885,11 +1885,11 @@ def reduced_word_graph(self):
sage: W = WeylGroup(['A', 3], prefix='s')
sage: w0 = W.long_element()
sage: G = w0.reduced_word_graph()
sage: G.num_verts()
sage: G.n_vertices()
16
sage: len(w0.reduced_words())
16
sage: G.num_edges()
sage: G.n_edges()
18
sage: len([e for e in G.edges(sort=False) if e[2] == 2])
10
Expand All @@ -1906,9 +1906,9 @@ def reduced_word_graph(self):
sage: # needs sage.combinat sage.graphs sage.groups
sage: w1 = W.one()
sage: G = w1.reduced_word_graph()
sage: G.num_verts()
sage: G.n_vertices()
1
sage: G.num_edges()
sage: G.n_edges()
0

.. SEEALSO::
Expand Down
6 changes: 3 additions & 3 deletions src/sage/categories/semigroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def cayley_graph(self, side='right', simple=False, elements=None,
....: vertex_colors={(1,1,1): G.vertices(sort=True)},
....: bgcolor=(0,0,0), color_by_label=True,
....: xres=700, yres=700, iterations=200)
sage: G.num_edges()
sage: G.n_edges()
120

sage: # needs sage.combinat sage.graphs sage.groups
Expand All @@ -221,7 +221,7 @@ def cayley_graph(self, side='right', simple=False, elements=None,

sage: # needs sage.graphs sage.groups
sage: G = A5.cayley_graph(generators=[A5.gens()[0]])
sage: G.num_edges()
sage: G.n_edges()
60
sage: g = PermutationGroup([(i + 1, j + 1)
....: for i in range(5)
Expand All @@ -242,7 +242,7 @@ def cayley_graph(self, side='right', simple=False, elements=None,
....: for w in sum((list(Words(M.semigroup_generators(), k))
....: for k in range(4)), [])]
sage: G = M.cayley_graph(elements=elements)
sage: G.num_verts(), G.num_edges()
sage: G.n_vertices(), G.n_edges()
(85, 84)
sage: G.show3d(color_by_label=True, edge_size=0.001, vertex_size=0.01) # needs sage.plot

Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/constellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,9 +885,9 @@ def braid_group_orbit(self):
g1 (0)(1,4)(2)(3)
g2 (0,1,3,2,4)
sage: G = c.braid_group_orbit()
sage: G.num_verts()
sage: G.n_vertices()
4
sage: G.num_edges()
sage: G.n_edges()
12
"""
G = DiGraph(multiedges=True, loops=True)
Expand Down
8 changes: 4 additions & 4 deletions src/sage/combinat/designs/bibd.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def balanced_incomplete_block_design(v, k, lambd=1, existence=False, use_LJCR=Fa
return False
raise EmptySetError(f"there exists no ({v},{k},{lambd})-BIBD")
B = B.incidence_structure()
if B.num_blocks() == expected_n_of_blocks:
if B.n_blocks() == expected_n_of_blocks:
if existence:
return True
else:
Expand Down Expand Up @@ -1467,7 +1467,7 @@ def __repr__(self):
(13,3,1)-Balanced Incomplete Block Design
"""
bsizes = list(frozenset(self.block_sizes()))
return "Pairwise Balanced Design on {} points with sets of sizes in {}".format(self.num_points(), bsizes)
return "Pairwise Balanced Design on {} points with sets of sizes in {}".format(self.n_points(), bsizes)


class BalancedIncompleteBlockDesign(PairwiseBalancedDesign):
Expand Down Expand Up @@ -1526,10 +1526,10 @@ def __repr__(self):
sage: b=designs.balanced_incomplete_block_design(9,3); b
(9,3,1)-Balanced Incomplete Block Design
"""
v = self.num_points()
v = self.n_points()
k = len(self._blocks[0]) if self._blocks else 0
l = self._lambd
return "({},{},{})-Balanced Incomplete Block Design".format(v,k,l)
return f"({v},{k},{l})-Balanced Incomplete Block Design"

def arc(self, s=2, solver=None, verbose=0, *, integrality_tolerance=1e-3):
r"""
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/designs/gen_quadrangles_with_spread.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def dual_GQ_ovoid(GQ, O):

# GQ.ground_set()[i] becomes newBlocks[i]
# GQ.blocks()[i] becomes i
newBlocks = [[] for _ in range(GQ.num_points())]
newBlocks = [[] for _ in range(GQ.n_points())]
pointsToInt = {p: i for i, p in enumerate(GQ.ground_set())}

for i, b in enumerate(GQ.blocks()):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/designs/group_divisible_designs.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def __init__(self, points, groups, blocks, G=None, K=None, lambd=1,

if check or groups is None:
is_gdd = is_group_divisible_design(self._groups, self._blocks,
self.num_points(), G, K,
self.n_points(), G, K,
lambd, verbose=1)
assert is_gdd
if groups is None:
Expand Down Expand Up @@ -355,6 +355,6 @@ def __repr__(self):
if not gdd_type:
gdd_type = "1^0"

v = self.num_points()
v = self.n_points()

return "Group Divisible Design on {} points of type {}".format(v, gdd_type)
Loading
Loading