'''
Created on Feb 22, 2013
@author: Rossi Kamal(rossi@khu.ac.kr), under supervision of Professor Dr Choong Seon Hong(cshong@khu.ac.kr)

INPUT:
X:k*2 Matrix
MU: 1*k Matrix 
OUTPUT:
BIG-SIGMA:2*2 Matrix

       
BIG-SIGMA(Variance-Covariance Matrix)= (1/k)* (X-MU)^T * (X-MU)
'''
import numpy as np
class BiVariateVarianceCovarianceMatrixGenerator:
    '''
    Constructor for BiVariateVarianceCovarianceMatrixGenerator:
    '''
    def __init(self,bi_variate_x,bi_variate_mean):
        self.bi_variate_x=bi_variate_x
        self.bi_variate_mean=bi_variate_mean
    '''
    Function for VarianceCovariance Matrix Generation
    '''
    
    def calculate_variance_covariance_matrix(self):
        for i in range(self.bi_variate_x.size/2):
            self.bi_variate_x[i,0]=self.bi_variate_x[i,0]-self.bi_variate_mean[0,0]
            self.bi_variate_x[i,1]=self.bi_variate_x[i,1]-self.bi_variate_mean[0,1]
        return (1/(self.bi_variate_x.size/2))*(np.transpose(self.bi_variate_x))*(self.bi_variate_x)
    