WIP: Cas des espaces de taille constante: string.
This commit is contained in:
parent
5a52450ae1
commit
8a7f97f53a
Binary file not shown.
22
src/space.py
22
src/space.py
|
@ -6,10 +6,10 @@ sites = int(model.testmodel.get_parameters().spaceparam.get_site_multiplicity())
|
||||||
nb_arrows = int(model.testmodel.get_states().get_space(0).get_nb_arrows())
|
nb_arrows = int(model.testmodel.get_states().get_space(0).get_nb_arrows())
|
||||||
|
|
||||||
|
|
||||||
print("\nspace size = ", size, " nb de sites par cellule = ", sites,
|
print("\nspace size =", size, " nb de sites par cellule =", sites,
|
||||||
" nb total de flèches dans l'espace = ", nb_arrows)
|
" nb total de flèches dans l'espace =", nb_arrows, end='\n')
|
||||||
|
|
||||||
print(' | ', end=' ')
|
view = ' | '
|
||||||
|
|
||||||
# TODO Contrôles de cohérence des données
|
# TODO Contrôles de cohérence des données
|
||||||
# condition et arrow
|
# condition et arrow
|
||||||
|
@ -31,19 +31,19 @@ for n in range(0, size + 1):
|
||||||
):
|
):
|
||||||
arr = sp.get_arrow(a).get_weight()
|
arr = sp.get_arrow(a).get_weight()
|
||||||
if arr > 0:
|
if arr > 0:
|
||||||
print(str(arr), end=' ')
|
view += str(arr) + ' '
|
||||||
else:
|
else:
|
||||||
print('.', end=' ')
|
view += '. '
|
||||||
|
|
||||||
print(' | ', end=' ')
|
view += ' | '
|
||||||
|
|
||||||
print('\n ' + ' ' * sites * 2, end='')
|
|
||||||
|
|
||||||
|
coord = ' ' * sites + ' '
|
||||||
|
|
||||||
for k in range(0, size + 1):
|
for k in range(0, size + 1):
|
||||||
if k < 9:
|
if k < 9:
|
||||||
print(k + 1, end=' ' + ' ' * sites * 2)
|
coord += str(k + 1) + ' ' + ' ' * sites * 2
|
||||||
else:
|
else:
|
||||||
print(k + 1, end=' ' + ' ' * sites * 2)
|
coord += str(k + 1) + ' ' + ' ' * sites * 2
|
||||||
|
|
||||||
print('\n', end="")
|
print(view)
|
||||||
|
print(coord)
|
||||||
|
|
Loading…
Reference in New Issue