コード例 #1
0
        public override float Product(int element1, int element2)
        {
            if (element1 >= problemElements.Length)
            {
                throw new IndexOutOfRangeException("element1 out of range");
            }

            if (element2 >= problemElements.Length)
            {
                throw new IndexOutOfRangeException("element2 out of range");
            }

            return(ChiSquaredNormKernel.ChiSquareNormDist(problemElements[element1], problemElements[element2]));
        }
コード例 #2
0
 public override float Product(SparseVec element1, SparseVec element2)
 {
     //return chiSquared.Product(element1, element2);
     return(ChiSquaredNormKernel.ChiSquareNormDist(element1, element2));
 }