using System;

namespace LabelerCore.Model
{
    public static class CheckInputs
    {

        public static void CheckNumberOfFeatures(double[][] X1, double [][] X2)
        {
            if(X1[0].Length != X2[0].Length)
            {
                throw new ArgumentException("Invalid number of features, expected " +
                                            X1[0].Length.ToString(), ", but actual " +
                                            X2[0].Length.ToString());
            }
        }
        public static void CheckNumberOfFeatures(double[][] X, double[] x)
        {
            if (X[0].Length != x.Length)
            {
                throw new ArgumentException("Invalid number of features, expected " +
                                            X[0].Length.ToString(), ", but actual " +
                                            x.Length.ToString());
            }
        }

        public static void CheckNumberOfFeatures(double[] x1, double[] x2)
        {
            if (x1.Length != x2.Length)
            {
                throw new ArgumentException("Invalid number of features, expected " +
                                            x1.Length.ToString(), ", but actual " +
                                            x2.Length.ToString());
            }
        }

        public static void CheckNumberOfSamples(double[][] X, int[] y)
        {
            if (X.Length != y.Length)
            {
                throw new ArgumentException("Invalid number of samples, expected " +
                                            X.Length.ToString(), ", but actual " +
                                            y.Length.ToString());
            }
        }


    }
}
