pub fn direct_product<J: Iterator<Item = Matrix<T>>>(
        self,
        g: Group<J>,
    ) -> Group<impl Iterator<Item = Matrix<T>>> {
        // Safety: the direct sum is always a group isomorphic to the Cartesian
        // product.
        unsafe {
            Group::new(
                self.dim + g.dim,
                (self.collect::<Vec<_>>(), g.collect::<Vec<_>>())
                    .into_pairs()
                    .map(direct_sum),
            )
        }
    }
/// Calculates the direct product of two groups. Pairs of matrices are then
/// mapped to their direct sum.
Calculates the direct product of two groups. Pairs of matrices are then
mapped to their direct sum.
Calculates the direct product of two groups . Pairs of matrices are then mapped to their direct sum .
pub fn direct_product<J: Iterator<Item = Matrix<T>>>(
        self,
        g: Group<J>,
    ) -> Group<impl Iterator<Item = Matrix<T>>> {
        // Safety: the direct sum is always a group isomorphic to the Cartesian
        // product.
        unsafe {
            Group::new(
                self.dim + g.dim,
                (self.collect::<Vec<_>>(), g.collect::<Vec<_>>())
                    .into_pairs()
                    .map(direct_sum),
            )
        }
    }
pub fn direct_product < J : Iterator < Item = Matrix < T > > > ( self , g : Group < J > , ) -> Group < impl Iterator < Item = Matrix < T > > > { // Safety: the direct sum is always a group isomorphic to the Cartesian // product. unsafe { Group :: new ( self . dim + g . dim , ( self . collect :: < Vec < _ > > ( ) , g . collect :: < Vec < _ > > ( ) ) . into_pairs ( ) . map ( direct_sum ) , ) } }
Calculates the direct product of two groups.
Calculates the direct product of two groups .
self
g
Group<J>
self
g
Group<J>