# NOT RUN {
# Return the scompositions of the vector (1,1) in 2 vectors of 2 non-negative integers such that
# their sum is (1,1), that is
# ([1,1],[0,0]) - ([0,0],[1,1]) - ([1,0],[0,1]) - ([0,1],[1,0])
mkT(c(1,1),2)
# Return the scompositions of the vector (1,0,1) in 2 vectors of 3 non-negative integers such that
# their sum gives (1,0,1), that is
# ([1,0,1],[0,0,0]) - ([0,0,0],[1,0,1]) - ([1,0,0],[0,0,1]) - ([0,0,1],[1,0,0]).
# Note that the second value in each resulting vector is always zero.
mkT(c(1,0,1),2)
# Return the scompositions of the vector (1,1,1) in 3 vectors of 3 non-negative integers such that
# their sum gives (1,1,1). The result is in a compact form expression.
for (m in mkT(c(1,1,1),3)) {for (n in m) cat(n," - "); cat("\n"); }
# }
Run the code above in your browser using DataLab