<para>
Returns the distance between two cubes. If both
cubes are points, this is the normal distance function.
</para>
<para>
<literal>cube_distance('(1,2)', '(3,4)')</literal>
<returnvalue>2.8284271247461903</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>cube_subset</function> ( <type>cube</type>, <type>integer[]</type> )
<returnvalue>cube</returnvalue>
</para>
<para>
Makes a new cube from an existing cube, using a list of
dimension indexes from an array. Can be used to extract the endpoints
of a single dimension, or to drop dimensions, or to reorder them as
desired.
</para>
<para>
<literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[2])</literal>
<returnvalue>(3),(7)</returnvalue>
</para>
<para>
<literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1])</literal>
<returnvalue>(5, 3, 1, 1),(8, 7, 6, 6)</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>cube_union</function> ( <type>cube</type>, <type>cube</type> )
<returnvalue>cube</returnvalue>
</para>
<para>
Produces the union of two cubes.
</para>
<para>
<literal>cube_union('(1,2)', '(3,4)')</literal>
<returnvalue>(1, 2),(3, 4)</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>cube_inter</function> ( <type>cube</type>, <type>cube</type> )
<returnvalue>cube</returnvalue>
</para>
<para>
Produces the intersection of two cubes.
</para>
<para>
<literal>cube_inter('(1,2)', '(3,4)')</literal>
<returnvalue>(3, 4),(1, 2)</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>cube_enlarge</function> ( <parameter>c</parameter> <type>cube</type>, <parameter>r</parameter> <type>double</type>, <parameter>n</parameter> <type>integer</type> )
<returnvalue>cube</returnvalue>
</para>
<para>
Increases the size of the cube by the specified
radius <parameter>r</parameter> in at least <parameter>n</parameter>
dimensions. If the radius is negative the cube is shrunk instead.
All defined dimensions are changed by the
radius <parameter>r</parameter>. Lower-left coordinates are decreased
by <parameter>r</parameter> and upper-right coordinates are increased
by <parameter>r</parameter>. If a lower-left coordinate is increased
to more than the corresponding upper-right coordinate (this can only
happen when <parameter>r</parameter> < 0) than both coordinates are
set to their average. If <parameter>n</parameter> is greater than the
number of defined dimensions and the cube is being enlarged
(<parameter>r</parameter> > 0), then extra dimensions are added to
make <parameter>n</parameter> altogether; 0 is used as the initial
value for the extra coordinates. This function is useful