/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Catalano.Statistics.Kernels;

/**
 *
 * @author Diego
 */
public class Tensor implements IMercerKernel{
    
    private IMercerKernel[] kernels;

    public Tensor(IMercerKernel[] kernels) {
        this.kernels = kernels;
    }

    @Override
    public double Function(double[] x, double[] y) {
        double product = 1.0;

        for (int i = 0; i < kernels.length; i++)
        {
            product *= kernels[i].Function(x, y);
        }

        return product;
    }
}
 

Ads help maintain this website.