// InnerProduct computes the inner product through a kernel trick
// K(x, y) = exp(-gamma * ||x - y||^2)
167454
func (r *RBFKernel) InnerProduct(vectorX *mat.Dense, vectorY *mat.Dense) float64 {
	euclidean := NewEuclidean()
	distance := euclidean.Distance(vectorX, vectorY)

	result := math.Exp(-r.gamma * math.Pow(distance, 2))

	return result
}
69222
func NewProductServerAPI(client *Client) *ProductServerAPI {
	return &ProductServerAPI{
		&baseAPI{
			client: client,
			// FuncGetResourceURL
			FuncGetResourceURL: func() string {
				return "product/server"
			},
		},
	}
}
713817
func (s *ReservedDBInstancesOffering) SetProductDescription(v string) *ReservedDBInstancesOffering {
	s.ProductDescription = &v
	return s
}
1189319
func (s *AwsSecurityFinding) SetProductArn(v string) *AwsSecurityFinding {
	s.ProductArn = &v
	return s
}
309757
func (s *UpdatePhoneNumberInput) SetProductType(v string) *UpdatePhoneNumberInput {
	s.ProductType = &v
	return s
}
1073409
public double innerproduct(double[] vec1, double[] vec2) {
    double sum = 0;

    for (int i = 0; i < vec1.length; i++) {
      sum += vec1[i] * vec2[i];
    }

    return sum;
  }
897584
func (e *Euclidean) Distance(vectorX *mat.Dense, vectorY *mat.Dense) float64 {
	subVector := mat.NewDense(1, 1, nil)
	subVector.Reset()
	subVector.Sub(vectorX, vectorY)
	result := e.InnerProduct(subVector, subVector)

	return math.Sqrt(result)
}
427906
func NewUsProductType(s string) (usProductType, error) {
	var e usProductType
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}
691530
func (s *ReservedCacheNode) SetProductDescription(v string) *ReservedCacheNode {
	s.ProductDescription = &v
	return s
}
397587
func Product(pools [][]interface{}) (*ProductIterator, error) {
	iter := &ProductIterator{
		pools: pools,
		n:     len(pools),
	}

	iter.max = iter.len()

	iter.Reset()

	return iter, nil
}
735763
func GetProducts(contract *Contract) (*Products, error) {
	products := NewProducts()
	if err := products.GetProducts(contract); err != nil {
		return nil, err
	}

	return products, nil
}
1310087
func (s *PhoneNumberOrder) SetProductType(v string) *PhoneNumberOrder {
	s.ProductType = &v
	return s
}
348553
func (s *DescribeReservedDBInstancesInput) SetProductDescription(v string) *DescribeReservedDBInstancesInput {
	s.ProductDescription = &v
	return s
}
1105532
func probFalsePositive(l, k int, t, precision float64) float64 {
	return integral(falsePositive(l, k), 0, t, precision)
}
327135
func (e *Euclidean) InnerProduct(vectorX *mat.Dense, vectorY *mat.Dense) float64 {
	subVector := mat.NewDense(1, 1, nil)
	subVector.Reset()
	subVector.MulElem(vectorX, vectorY)
	result := mat.Sum(subVector)

	return result
}
794284
func (s *ElastiCacheInstanceDetails) SetProductDescription(v string) *ElastiCacheInstanceDetails {
	s.ProductDescription = &v
	return s
}
921748
func (r Billing_Invoice_Item) GetProduct() (resp datatypes.Product_Item, err error) {
	err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getProduct", nil, &r.Options, &resp)
	return
}