Home > manopt > tools > multihconj_legacy.m

# multihconj_legacy

## PURPOSE

MULTIHCONJ Hermitian conjugating arrays of matrices.

## SYNOPSIS

function b = multihconj_legacy(a, dim)

## DESCRIPTION

MULTIHCONJ  Hermitian conjugating arrays of matrices.

THIS ORIGINAL MULTIHCONJ IS NOW CALLED MULTIHCONJ_LEGACY

B = MULTIHCONJ(A) is equivalent to B = MULTIHCONJ(A, DIM), where
DIM = 1.

B = MULTIHCONJ(A, DIM) is equivalent to
B = PERMUTE(A, [1:DIM-1, DIM+1, DIM, DIM+2:NDIMS(A)]), where A is an
array containing N P-by-Q matrices along its dimensions DIM and DIM+1,
and B is an array containing the Q-by-P Hermitian conjugate (') of
those N matrices along the same dimensions. N = NUMEL(A) / (P*Q), i.e.
N is equal to the number of elements in A divided by the number of
elements in each matrix.

Example:
A 5-by-9-by-3-by-2 array may be considered to be a block array
containing ten 9-by-3 matrices along dimensions 2 and 3. In this
case, its size is so indicated:  5-by-(9-by-3)-by-2 or 5x(9x3)x2.
If A is ................ a 5x(9x3)x2 array of 9x3 matrices,
C = MULTIHCONJ(A, 2) is a 5x(3x9)x2 array of 3x9 matrices.

See also MULTIHCONJ MULTITRANSP MULTIHERM.

## CROSS-REFERENCE INFORMATION

This function calls:
This function is called by:
• multihconj Hermitian-conjugate transpose the matrix slices of an N-D array

## SOURCE CODE

0001 function b = multihconj_legacy(a, dim)
0002 %MULTIHCONJ  Hermitian conjugating arrays of matrices.
0003 %
0004 %    THIS ORIGINAL MULTIHCONJ IS NOW CALLED MULTIHCONJ_LEGACY
0005 %
0006 %    B = MULTIHCONJ(A) is equivalent to B = MULTIHCONJ(A, DIM), where
0007 %    DIM = 1.
0008 %
0009 %    B = MULTIHCONJ(A, DIM) is equivalent to
0010 %    B = PERMUTE(A, [1:DIM-1, DIM+1, DIM, DIM+2:NDIMS(A)]), where A is an
0011 %    array containing N P-by-Q matrices along its dimensions DIM and DIM+1,
0012 %    and B is an array containing the Q-by-P Hermitian conjugate (') of
0013 %    those N matrices along the same dimensions. N = NUMEL(A) / (P*Q), i.e.
0014 %    N is equal to the number of elements in A divided by the number of
0015 %    elements in each matrix.
0016 %
0017 %
0018 %    Example:
0019 %       A 5-by-9-by-3-by-2 array may be considered to be a block array
0020 %       containing ten 9-by-3 matrices along dimensions 2 and 3. In this
0021 %       case, its size is so indicated:  5-by-(9-by-3)-by-2 or 5x(9x3)x2.
0022 %       If A is ................ a 5x(9x3)x2 array of 9x3 matrices,
0023 %       C = MULTIHCONJ(A, 2) is a 5x(3x9)x2 array of 3x9 matrices.
0024 %
0025 %    See also MULTIHCONJ MULTITRANSP MULTIHERM.
0026
0027 % This file is part of Manopt: www.manopt.org.
0028 % Original author: Hiroyuki Sato, April 27, 2015.
0029 % Contributors:
0030 % Change log:
0031
0032     % Setting DIM if not supplied.
0033     if nargin == 1, dim = 1; end
0034
0035     % Transposing
0036     b = multitransp_legacy(a, dim);
0037
0038     %Conjugating
0039     b = conj(b);
0040
0041 end

Generated on Fri 30-Sep-2022 13:18:25 by m2html © 2005