+// Copyright (C) 2021 Harry Godden (hgn)
+
+// API
+//=======================================================================================================================
+
+// Algorithm 1: Generate non-repeating combinations of size M in set of N
+// Usage:
+// int p[3];
+// hgn_comb_init( 3, p );
+//
+// do
+// {
+// something with p[0], p[1], p[2]
+// }
+// while( hgn_comb( 3, 5, p ) );
+//
+// Output of p each iteration:
+// 0 1 2
+// 0 1 3
+// 0 1 4
+// 0 2 3
+// 0 2 4
+// 0 3 4
+// 1 2 3
+// 1 2 4
+// 1 3 4
+// 2 3 4
+
+void csr_comb_init( int const M, int p[] );
+int csr_comb( int M, int N, int p[] );
+
+// Implementation
+//=======================================================================================================================
+
+#ifdef CSR_EXECUTABLE
+
void csr_comb_init( int const M, int p[] )
{
for( int i = 0; i < M; i ++ )
}
return 0;
}
+
+#endif