Stirling numbers of the first kind: Difference between revisions

Content added Content deleted
m (Removed unncessary #include from C++ code)
m (Use aggregate_all instead of findall/max_list to find maximum value)
Line 777: Line 777:
print_stirling_numbers_up_to(_).
print_stirling_numbers_up_to(_).


max_stirling1(N, M):-
max_stirling1(N, Max):-
findall(L, (between(1, N, K), stirling1(N, K, L)), List),
aggregate_all(max(L), (between(1, N, K), stirling1(N, K, L)), Max).
max_list(List, M).


main:-
main:-