#include "sgm_esl.h"

void SGM_ESL::CalPartB(_1dArray obs_array){
	int i, j;
	//PartB = G^T * W_d^TW_d * d_obs + mu * W_m^TW_m * M_ref
	//W_m^TW_m = WzTWz*WvTWv*wm
#pragma omp parallel for private(j) schedule(guided)
	for (j = 0; j < mod_blocks_num_; j++)
	{
		PartB[j] = 0.0;
		for (i = 0; i < obs_points_num_; i++)
		{
			PartB[j] += GM_kernel_[i][j]*WdTWd[i]*obs_array[i];
		}
	}
	return;
}