//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "TCFbEAmplifiedWeightedSumWithWeightedMultiplierInNeighbors.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
//---------------------------------------------------------------------------
// コンストラクタ
__fastcall TCFbEAmplifiedWeightedSumWithWeightedMultiplierInNeighbors::TCFbEAmplifiedWeightedSumWithWeightedMultiplierInNeighbors(int NeighborhoodSize)
    : TCFbEAmplifiedWeightedSumWithWeightedMultiplier(NeighborhoodSize)
{
}

//---------------------------------------------------------------------------
// デストラクタ
__fastcall TCFbEAmplifiedWeightedSumWithWeightedMultiplierInNeighbors::~TCFbEAmplifiedWeightedSumWithWeightedMultiplierInNeighbors()
{

}

//---------------------------------------------------------------------------
// 分子の値を得る
double __fastcall TCFbEAmplifiedWeightedSumWithWeightedMultiplierInNeighbors::GetNumerator(TCFbECollaborativeFiltering* CF, TCFbEFileList* NearestNeighbors, int i, int j)
{
    TCFbEFile* Neighbor = NearestNeighbors->Items[i];
    Neighbor->Amplifier = Neighbor->MetricList->GetWeightedMultiplier(cavValue, j, CF->DataSet->File[CF->ActiveIndex]->MetricList, NearestNeighbors);
    return Neighbor->Similarity * Neighbor->MetricList->Items[j]->Value * Neighbor->Amplifier;
}

//---------------------------------------------------------------------------

