static void printDistribution ( float mat [ ] [ ] ) {
  int N = mat . length ;
  float [ ] [ ] tr = new float [ N ] [ N ] ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) for ( int j = 0 ;
  j < N ;
  j ++ ) tr [ i ] [ j ] = mat [ j ] [ i ] ;
  float [ ] [ ] symm = new float [ N ] [ N ] ;
  float [ ] [ ] skewsymm = new float [ N ] [ N ] ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) {
    for ( int j = 0 ;
    j < N ;
    j ++ ) {
      symm [ i ] [ j ] = ( mat [ i ] [ j ] + tr [ i ] [ j ] ) / 2 ;
      skewsymm [ i ] [ j ] = ( mat [ i ] [ j ] - tr [ i ] [ j ] ) / 2 ;
    }
  }
  System . out . println ( "Symmetric matrix-" ) ;
  printMatrix ( symm ) ;
  System . out . println ( "Skew Symmetric matrix-" ) ;
  printMatrix ( skewsymm ) ;
}

static void printDistribution ( float mat [ ] [ ] ) { int N = mat . length ; float [ ] [ ] tr = new float [ N ] [ N ] ; for ( int i = 0 ; i < N ; i ++ ) for ( int j = 0 ; j < N ; j ++ ) tr [ i ] [ j ] = mat [ j ] [ i ] ; float [ ] [ ] symm = new float [ N ] [ N ] ; float [ ] [ ] skewsymm = new float [ N ] [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = 0 ; j < N ; j ++ ) { symm [ i ] [ j ] = ( mat [ i ] [ j ] + tr [ i ] [ j ] ) / 2 ; skewsymm [ i ] [ j ] = ( mat [ i ] [ j ] - tr [ i ] [ j ] ) / 2 ; } } System . out . println ( " Symmetric ▁ matrix - " ) ; printMatrix ( symm ) ; System . out . println ( " Skew ▁ Symmetric ▁ matrix - " ) ; printMatrix ( skewsymm ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (floating_point_type) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (field_access object: (identifier) field: (identifier)))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (identifier)) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (identifier)) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (identifier)) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) right: (decimal_integer_literal)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))