G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.0.4 (2026/08/19)

Reference

Reptorian's Combinatorics Library: Incremental Combination


Description

Combinations represented as non-decreasing integer sequences.
Each indices is either equal to or greater than previous indice by 1.

$ +rep_inc_combinations 5 repeat w { e[0] {I[#-1,$>]} }

[gmic]./ Start G'MIC interpreter (v.3.7.3).
[gmic]./ 0,0,0,0,0
[gmic]./ 0,0,0,0,1
[gmic]./ 0,0,0,1,1
[gmic]./ 0,0,0,1,2
[gmic]./ 0,0,1,1,1
[gmic]./ 0,0,1,1,2
[gmic]./ 0,0,1,2,2
[gmic]./ 0,0,1,2,3
[gmic]./ 0,1,1,1,1
[gmic]./ 0,1,1,1,2
[gmic]./ 0,1,1,2,2
[gmic]./ 0,1,1,2,3
[gmic]./ 0,1,2,2,2
[gmic]./ 0,1,2,2,3
[gmic]./ 0,1,2,3,3
[gmic]./ 0,1,2,3,4
[gmic]./ Display image [0] = '[unnamed]'.
[0] = '[unnamed]':
  size = (16,1,1,5) [320 b of float32].
  data = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0^0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1^0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2^0,0,1,1,1,1,2,2,1,1,2,2,2,2,3,3^0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4).
  min = 0, max = 4, mean = 1, std = 1, coords_min = (0,0,0,0), coords_max = (15,0,0,4).
[gmic]./ End G'MIC interpreter.

Commands

Incremental Combinations:

rep_inc_combinationsrep_inc_combination_index2listrep_inc_combination_list2index
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.