protected virtual unsafe void ResillientWeightUpdate(global::Org.Neuroph.Core.Weight p0)
        {
            if (id_resillientWeightUpdate_Lorg_neuroph_core_Weight_ == IntPtr.Zero)
            {
                id_resillientWeightUpdate_Lorg_neuroph_core_Weight_ = JNIEnv.GetMethodID(class_ref, "resillientWeightUpdate", "(Lorg/neuroph/core/Weight;)V");
            }
            try {
                JValue *__args = stackalloc JValue [1];
                __args [0] = new JValue(p0);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_resillientWeightUpdate_Lorg_neuroph_core_Weight_, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "resillientWeightUpdate", "(Lorg/neuroph/core/Weight;)V"), __args);
                }
            } finally {
            }
        }
        protected virtual unsafe void ApplyWeightChange(global::Org.Neuroph.Core.Weight p0, double p1)
        {
            if (id_applyWeightChange_Lorg_neuroph_core_Weight_D == IntPtr.Zero)
            {
                id_applyWeightChange_Lorg_neuroph_core_Weight_D = JNIEnv.GetMethodID(class_ref, "applyWeightChange", "(Lorg/neuroph/core/Weight;D)V");
            }
            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_applyWeightChange_Lorg_neuroph_core_Weight_D, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "applyWeightChange", "(Lorg/neuroph/core/Weight;D)V"), __args);
                }
            } finally {
            }
        }
 public static unsafe void CreateConnection(global::Org.Neuroph.Core.Neuron p0, global::Org.Neuroph.Core.Neuron p1, global::Org.Neuroph.Core.Weight p2)
 {
     if (id_createConnection_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Weight_ == IntPtr.Zero)
     {
         id_createConnection_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Weight_ = JNIEnv.GetStaticMethodID(class_ref, "createConnection", "(Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Weight;)V");
     }
     try {
         JValue *__args = stackalloc JValue [3];
         __args [0] = new JValue(p0);
         __args [1] = new JValue(p1);
         __args [2] = new JValue(p2);
         JNIEnv.CallStaticVoidMethod(class_ref, id_createConnection_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Weight_, __args);
     } finally {
     }
 }
Ejemplo n.º 4
0
        public unsafe Connection(global::Org.Neuroph.Core.Neuron p0, global::Org.Neuroph.Core.Neuron p1, global::Org.Neuroph.Core.Weight p2)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                if (GetType() != typeof(Connection))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Weight;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Weight;)V", __args);
                    return;
                }

                if (id_ctor_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Weight_ == IntPtr.Zero)
                {
                    id_ctor_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Weight_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Neuron;Lorg/neuroph/core/Weight;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Weight_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Neuron_Lorg_neuroph_core_Weight_, __args);
            } finally {
            }
        }
Ejemplo n.º 5
0
 static void n_SetWeight_Lorg_neuroph_core_Weight_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Core.Connection __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Connection> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Core.Weight     p0     = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.Weight = p0;
 }
Ejemplo n.º 6
0
 static void n_Randomize_DD(IntPtr jnienv, IntPtr native__this, double p0, double p1)
 {
     global::Org.Neuroph.Core.Weight __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     __this.Randomize(p0, p1);
 }
Ejemplo n.º 7
0
 static void n_SetValue_D(IntPtr jnienv, IntPtr native__this, double p0)
 {
     global::Org.Neuroph.Core.Weight __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     __this.Value = p0;
 }
Ejemplo n.º 8
0
 static double n_GetValue(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Core.Weight __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(__this.Value);
 }
Ejemplo n.º 9
0
 static void n_SetTrainingData_Ljava_lang_Object_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Core.Weight __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Java.Lang.Object        p0     = global::Java.Lang.Object.GetObject <global::Java.Lang.Object> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.TrainingData = p0;
 }
Ejemplo n.º 10
0
 static IntPtr n_GetTrainingData(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Core.Weight __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(JNIEnv.ToLocalJniHandle(__this.TrainingData));
 }
 static void n_ApplyWeightChange_Lorg_neuroph_core_Weight_D(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, double p1)
 {
     global::Org.Neuroph.Nnet.Learning.LMS __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Nnet.Learning.LMS> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Core.Weight       p0     = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.ApplyWeightChange(p0, p1);
 }
 static void n_InitTrainingDataBuffer_I(IntPtr jnienv, IntPtr native__this, int p0)
 {
     global::Org.Neuroph.Core.Weight __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     __this.InitTrainingDataBuffer(p0);
 }
 static void n_ResillientWeightUpdate_Lorg_neuroph_core_Weight_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Nnet.Learning.ResilientPropagation __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Nnet.Learning.ResilientPropagation> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Core.Weight p0 = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.ResillientWeightUpdate(p0);
 }
 static void n_Randomize_Ljava_util_Random_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Core.Weight __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Weight> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Java.Util.Random        p0     = global::Java.Lang.Object.GetObject <global::Java.Util.Random> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.Randomize(p0);
 }