Example #1
0
        public unsafe MatrixMlpLayer(global::Org.Neuroph.Core.Layer p0, global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer p1, global::Org.Neuroph.Core.Transfer.TransferFunction 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(MatrixMlpLayer))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lorg/neuroph/core/Layer;Lorg/neuroph/contrib/matrixmlp/MatrixLayer;Lorg/neuroph/core/transfer/TransferFunction;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Lorg/neuroph/core/Layer;Lorg/neuroph/contrib/matrixmlp/MatrixLayer;Lorg/neuroph/core/transfer/TransferFunction;)V", __args);
                    return;
                }

                if (id_ctor_Lorg_neuroph_core_Layer_Lorg_neuroph_contrib_matrixmlp_MatrixLayer_Lorg_neuroph_core_transfer_TransferFunction_ == IntPtr.Zero)
                {
                    id_ctor_Lorg_neuroph_core_Layer_Lorg_neuroph_contrib_matrixmlp_MatrixLayer_Lorg_neuroph_core_transfer_TransferFunction_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lorg/neuroph/core/Layer;Lorg/neuroph/contrib/matrixmlp/MatrixLayer;Lorg/neuroph/core/transfer/TransferFunction;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lorg_neuroph_core_Layer_Lorg_neuroph_contrib_matrixmlp_MatrixLayer_Lorg_neuroph_core_transfer_TransferFunction_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lorg_neuroph_core_Layer_Lorg_neuroph_contrib_matrixmlp_MatrixLayer_Lorg_neuroph_core_transfer_TransferFunction_, __args);
            } finally {
            }
        }
 static void n_SetOutputs_arrayD(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     double[] p0 = (double[])JNIEnv.GetArray(native_p0, JniHandleOwnership.DoNotTransfer, typeof(double));
     __this.SetOutputs(p0);
     if (p0 != null)
     {
         JNIEnv.CopyArray(p0, native_p0);
     }
 }
 static void n_Calculate(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     __this.Calculate();
 }
 static IntPtr n_GetOutputs(IntPtr jnienv, IntPtr native__this)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(JNIEnv.NewArray(__this.GetOutputs()));
 }
Example #5
0
 static void n_SetPreviousLayer_Lorg_neuroph_contrib_matrixmlp_MatrixLayer_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.MatrixMlpLayer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer   p0     = (global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer)global::Java.Lang.Object.GetObject <global::Org.Neuroph.Contrib.Matrixmlp.IMatrixLayer> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.PreviousLayer = p0;
 }