% Cross-Gram Matrix of two sequences
% function [] = CrossGram(D1,D2)
%
% This algorithm calculates the Cross-Gram matrix of two sequences of 
% vectors. This vectors have to have the same dimensions. The cross-Gram 
% matrix is just the matrix containing the inner products of the vectors.
% G_{i,j} = <h_j, g_i>, where D1 is the synthesis operator of 
%  
% inputs : D1,D2 ....... Matrices containing the set of vectors as columns.
%
% usage:  CrossGram(D1,D2);
%
% date of creation: 27/06/2006 
% last changes: 14/06/2007
%
% Author:  XXL .. Peter Balazs, contact: Peter.Balazs@oeaw.ac.at
%
% Literature : [Xxl] P. Balazs; Frames, Finite Dimensionality and
%               Algorithms; in preparation (2006)
%
% See also: testframtrans.m
%
% Copyright : (c) Acoustics Research Institute, Austrian Academy of
%              Science
%              http://www.kfs.oeaw.ac.at
function G12 = CrossGram(D1,D2)

[N1 M1] = size(D1);
[N2 M2] = size(D2);

if N1 ~= N2  
    disp('The vectors have to have the same dimensionality.')
end

G12 = (D2')*(D1);
    % cross-Gram matrix, including complex conjugation
