Exemple #1
0
        public unsafe void Normalize(global::Org.Neuroph.Core.Learning.TrainingSet p0)
        {
            if (id_normalize_Lorg_neuroph_core_learning_TrainingSet_ == IntPtr.Zero)
            {
                id_normalize_Lorg_neuroph_core_learning_TrainingSet_ = JNIEnv.GetMethodID(class_ref, "normalize", "(Lorg/neuroph/core/learning/TrainingSet;)V");
            }
            JValue *__args = stackalloc JValue [1];

            __args [0] = new JValue(p0);
            JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_normalize_Lorg_neuroph_core_learning_TrainingSet_, __args);
        }
Exemple #2
0
 public override unsafe void DoLearningEpoch(global::Org.Neuroph.Core.Learning.TrainingSet p0)
 {
     if (id_doLearningEpoch_Lorg_neuroph_core_learning_TrainingSet_ == IntPtr.Zero)
     {
         id_doLearningEpoch_Lorg_neuroph_core_learning_TrainingSet_ = JNIEnv.GetMethodID(class_ref, "doLearningEpoch", "(Lorg/neuroph/core/learning/TrainingSet;)V");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_doLearningEpoch_Lorg_neuroph_core_learning_TrainingSet_, __args);
     } finally {
     }
 }
        public static unsafe global::Org.Neuroph.Core.Learning.TrainingSet CreateBlackAndWhiteTrainingSet(global::System.Collections.Generic.IList <string> p0, global::System.Collections.Generic.IDictionary <string, global::Org.Neuroph.Contrib.Imgrec.FractionRgbData> p1)
        {
            if (id_createBlackAndWhiteTrainingSet_Ljava_util_List_Ljava_util_Map_ == IntPtr.Zero)
            {
                id_createBlackAndWhiteTrainingSet_Ljava_util_List_Ljava_util_Map_ = JNIEnv.GetStaticMethodID(class_ref, "createBlackAndWhiteTrainingSet", "(Ljava/util/List;Ljava/util/Map;)Lorg/neuroph/core/learning/TrainingSet;");
            }
            IntPtr native_p0 = global::Android.Runtime.JavaList <string> .ToLocalJniHandle(p0);

            IntPtr native_p1 = global::Android.Runtime.JavaDictionary <string, global::Org.Neuroph.Contrib.Imgrec.FractionRgbData> .ToLocalJniHandle(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(native_p1);
                global::Org.Neuroph.Core.Learning.TrainingSet __ret = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (JNIEnv.CallStaticObjectMethod(class_ref, id_createBlackAndWhiteTrainingSet_Ljava_util_List_Ljava_util_Map_, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                JNIEnv.DeleteLocalRef(native_p0);
                JNIEnv.DeleteLocalRef(native_p1);
            }
        }
Exemple #4
0
        public override unsafe void Learn(global::Org.Neuroph.Core.Learning.TrainingSet p0)
        {
            if (id_learn_Lorg_neuroph_core_learning_TrainingSet_ == IntPtr.Zero)
            {
                id_learn_Lorg_neuroph_core_learning_TrainingSet_ = JNIEnv.GetMethodID(class_ref, "learn", "(Lorg/neuroph/core/learning/TrainingSet;)V");
            }
            try {
                JValue *__args = stackalloc JValue [1];
                __args [0] = new JValue(p0);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_learn_Lorg_neuroph_core_learning_TrainingSet_, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "learn", "(Lorg/neuroph/core/learning/TrainingSet;)V"), __args);
                }
            } finally {
            }
        }
Exemple #5
0
        public static unsafe global::Org.Neuroph.Core.Learning.TrainingSet ImportFromFile(string p0, int p1, int p2, string p3)
        {
            if (id_importFromFile_Ljava_lang_String_IILjava_lang_String_ == IntPtr.Zero)
            {
                id_importFromFile_Ljava_lang_String_IILjava_lang_String_ = JNIEnv.GetStaticMethodID(class_ref, "importFromFile", "(Ljava/lang/String;IILjava/lang/String;)Lorg/neuroph/core/learning/TrainingSet;");
            }
            IntPtr native_p0 = JNIEnv.NewString(p0);
            IntPtr native_p3 = JNIEnv.NewString(p3);

            try {
                JValue *__args = stackalloc JValue [4];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                __args [3] = new JValue(native_p3);
                global::Org.Neuroph.Core.Learning.TrainingSet __ret = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (JNIEnv.CallStaticObjectMethod(class_ref, id_importFromFile_Ljava_lang_String_IILjava_lang_String_, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                JNIEnv.DeleteLocalRef(native_p0);
                JNIEnv.DeleteLocalRef(native_p3);
            }
        }
        public static unsafe global::Org.Neuroph.Core.Learning.TrainingSet ImportFromArray(double[] p0, int p1, int p2)
        {
            if (id_importFromArray_arrayDII == IntPtr.Zero)
            {
                id_importFromArray_arrayDII = JNIEnv.GetStaticMethodID(class_ref, "importFromArray", "([DII)Lorg/neuroph/core/learning/TrainingSet;");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                global::Org.Neuroph.Core.Learning.TrainingSet __ret = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (JNIEnv.CallStaticObjectMethod(class_ref, id_importFromArray_arrayDII, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
        }
Exemple #7
0
 public static unsafe void TestNeuralNetwork(global::Org.Neuroph.Core.NeuralNetwork p0, global::Org.Neuroph.Core.Learning.TrainingSet p1)
 {
     if (id_testNeuralNetwork_Lorg_neuroph_core_NeuralNetwork_Lorg_neuroph_core_learning_TrainingSet_ == IntPtr.Zero)
     {
         id_testNeuralNetwork_Lorg_neuroph_core_NeuralNetwork_Lorg_neuroph_core_learning_TrainingSet_ = JNIEnv.GetStaticMethodID(class_ref, "testNeuralNetwork", "(Lorg/neuroph/core/NeuralNetwork;Lorg/neuroph/core/learning/TrainingSet;)V");
     }
     try {
         JValue *__args = stackalloc JValue [2];
         __args [0] = new JValue(p0);
         __args [1] = new JValue(p1);
         JNIEnv.CallStaticVoidMethod(class_ref, id_testNeuralNetwork_Lorg_neuroph_core_NeuralNetwork_Lorg_neuroph_core_learning_TrainingSet_, __args);
     } finally {
     }
 }
Exemple #8
0
 static void n_Normalize_Lorg_neuroph_core_learning_TrainingSet_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Util.Norm.INormalizer     __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Util.Norm.INormalizer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Core.Learning.TrainingSet p0     = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.Normalize(p0);
 }
 static void n_DoLearningEpoch_Lorg_neuroph_core_learning_TrainingSet_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Core.Learning.UnsupervisedLearning __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.UnsupervisedLearning> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Core.Learning.TrainingSet          p0     = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.DoLearningEpoch(p0);
 }
Exemple #10
0
 static void n_Learn_Lorg_neuroph_core_learning_TrainingSet_I(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, int p1)
 {
     global::Org.Neuroph.Core.Learning.IterativeLearning __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.IterativeLearning> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Core.Learning.TrainingSet       p0     = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.Learn(p0, p1);
 }
Exemple #11
0
 public abstract void DoLearningEpoch(global::Org.Neuroph.Core.Learning.TrainingSet p0);
 static void n_SetTrainingSet_Lorg_neuroph_core_learning_TrainingSet_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Core.Learning.LearningRule __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.LearningRule> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Core.Learning.TrainingSet  p0     = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.TrainingSet = p0;
 }