The at_con and at_var functions retrieve a sub-MC from an MC. What follows is an extended example of at_con's use; at_var is used the same way. Output came from view_k, but some white space was subsequently inserted to make the numbers easier to read.
The number inside the angle brackets indicates the order of the desired sub-MC. Because this number is a C++ template parameter, it must be known at compile time.
The number inside the parentheses indicates which of the sub-MC's of that order to select. This can be an ordinary variable not known until run time.
--------- given this definition --------- mcd5 const x {{{{{5.00,5.01},{5.02,5.03}},{{5.04,5.05},{5.06,5.07}}}, {{{5.08,5.09},{5.10,5.11}},{{5.12,5.13},{5.14,5.15}}}}, {{{{5.16,5.17},{5.18,5.19}},{{5.20,5.21},{5.22,5.23}}}, {{{5.24,5.25},{5.26,5.27}},{{5.28,5.29},{5.30,5.31}}}}}; --------- then all the sub-MC's are --------- x.at_con<5>( 0): [[[[[5.00 5.01] [5.02 5.03]] [[5.04 5.05] [5.06 5.07]]] [[[5.08 5.09] [5.10 5.11]] [[5.12 5.13] [5.14 5.15]]]] [[[[5.16 5.17] [5.18 5.19]] [[5.20 5.21] [5.22 5.23]]] [[[5.24 5.25] [5.26 5.27]] [[5.28 5.29] [5.30 5.31]]]]] x.at_con<4>( 0): [[[[5.00 5.01] [5.02 5.03]] [[5.04 5.05] [5.06 5.07]]] [[[5.08 5.09] [5.10 5.11]] [[5.12 5.13] [5.14 5.15]]]] x.at_con<4>( 1): [[[[5.16 5.17] [5.18 5.19]] [[5.20 5.21] [5.22 5.23]]] [[[5.24 5.25] [5.26 5.27]] [[5.28 5.29] [5.30 5.31]]]] x.at_con<3>( 0): [[[5.00 5.01] [5.02 5.03]] [[5.04 5.05] [5.06 5.07]]] x.at_con<3>( 1): [[[5.08 5.09] [5.10 5.11]] [[5.12 5.13] [5.14 5.15]]] x.at_con<3>( 2): [[[5.16 5.17] [5.18 5.19]] [[5.20 5.21] [5.22 5.23]]] x.at_con<3>( 3): [[[5.24 5.25] [5.26 5.27]] [[5.28 5.29] [5.30 5.31]]] x.at_con<2>( 0): [[5.00 5.01] [5.02 5.03]] x.at_con<2>( 1): [[5.04 5.05] [5.06 5.07]] x.at_con<2>( 2): [[5.08 5.09] [5.10 5.11]] x.at_con<2>( 3): [[5.12 5.13] [5.14 5.15]] x.at_con<2>( 4): [[5.16 5.17] [5.18 5.19]] x.at_con<2>( 5): [[5.20 5.21] [5.22 5.23]] x.at_con<2>( 6): [[5.24 5.25] [5.26 5.27]] x.at_con<2>( 7): [[5.28 5.29] [5.30 5.31]] x.at_con<1>( 0): [5.00 5.01] x.at_con<1>( 1): [5.02 5.03] x.at_con<1>( 2): [5.04 5.05] x.at_con<1>( 3): [5.06 5.07] x.at_con<1>( 4): [5.08 5.09] x.at_con<1>( 5): [5.10 5.11] x.at_con<1>( 6): [5.12 5.13] x.at_con<1>( 7): [5.14 5.15] x.at_con<1>( 8): [5.16 5.17] x.at_con<1>( 9): [5.18 5.19] x.at_con<1>(10): [5.20 5.21] x.at_con<1>(11): [5.22 5.23] x.at_con<1>(12): [5.24 5.25] x.at_con<1>(13): [5.26 5.27] x.at_con<1>(14): [5.28 5.29] x.at_con<1>(15): [5.30 5.31] x.at_con<0>( 0): 5.00 x.at_con<0>( 1): 5.01 x.at_con<0>( 2): 5.02 x.at_con<0>( 3): 5.03 x.at_con<0>( 4): 5.04 x.at_con<0>( 5): 5.05 x.at_con<0>( 6): 5.06 x.at_con<0>( 7): 5.07 x.at_con<0>( 8): 5.08 x.at_con<0>( 9): 5.09 x.at_con<0>(10): 5.10 x.at_con<0>(11): 5.11 x.at_con<0>(12): 5.12 x.at_con<0>(13): 5.13 x.at_con<0>(14): 5.14 x.at_con<0>(15): 5.15 x.at_con<0>(16): 5.16 x.at_con<0>(17): 5.17 x.at_con<0>(18): 5.18 x.at_con<0>(19): 5.19 x.at_con<0>(20): 5.20 x.at_con<0>(21): 5.21 x.at_con<0>(22): 5.22 x.at_con<0>(23): 5.23 x.at_con<0>(24): 5.24 x.at_con<0>(25): 5.25 x.at_con<0>(26): 5.26 x.at_con<0>(27): 5.27 x.at_con<0>(28): 5.28 x.at_con<0>(29): 5.29 x.at_con<0>(30): 5.30 x.at_con<0>(31): 5.31