Beispiel #1
0
        public unsafe WeightsRandomizer(global::Java.Util.Random p0)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JValue *__args = stackalloc JValue [1];
                __args [0] = new JValue(p0);
                if (GetType() != typeof(WeightsRandomizer))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Ljava/util/Random;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Ljava/util/Random;)V", __args);
                    return;
                }

                if (id_ctor_Ljava_util_Random_ == IntPtr.Zero)
                {
                    id_ctor_Ljava_util_Random_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Ljava/util/Random;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Ljava_util_Random_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_util_Random_, __args);
            } finally {
            }
        }
Beispiel #2
0
        public virtual unsafe void RandomizeWeights(global::Java.Util.Random p0)
        {
            if (id_randomizeWeights_Ljava_util_Random_ == IntPtr.Zero)
            {
                id_randomizeWeights_Ljava_util_Random_ = JNIEnv.GetMethodID(class_ref, "randomizeWeights", "(Ljava/util/Random;)V");
            }
            try {
                JValue *__args = stackalloc JValue [1];
                __args [0] = new JValue(p0);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_randomizeWeights_Ljava_util_Random_, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "randomizeWeights", "(Ljava/util/Random;)V"), __args);
                }
            } finally {
            }
        }
Beispiel #3
0
        public unsafe RealWebSocket(global::Okhttp3.Request request, global::Okhttp3.WebSocketListener listener, global::Java.Util.Random random, long pingIntervalMillis)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lokhttp3/Request;Lokhttp3/WebSocketListener;Ljava/util/Random;J)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((request == null) ? IntPtr.Zero : ((global::Java.Lang.Object)request).Handle);
                __args [1] = new JniArgumentValue((listener == null) ? IntPtr.Zero : ((global::Java.Lang.Object)listener).Handle);
                __args [2] = new JniArgumentValue((random == null) ? IntPtr.Zero : ((global::Java.Lang.Object)random).Handle);
                __args [3] = new JniArgumentValue(pingIntervalMillis);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
            }
        }
Beispiel #4
0
 static void n_SetRandomGenerator_Ljava_util_Random_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Util.Random.WeightsRandomizer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Util.Random.WeightsRandomizer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Java.Util.Random p0 = global::Java.Lang.Object.GetObject <global::Java.Util.Random> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.RandomGenerator = p0;
 }
Beispiel #5
0
 static void n_RandomizeWeights_Ljava_util_Random_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
 {
     global::Org.Neuroph.Core.Layer __this = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Layer> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Java.Util.Random       p0     = global::Java.Lang.Object.GetObject <global::Java.Util.Random> (native_p0, JniHandleOwnership.DoNotTransfer);
     __this.RandomizeWeights(p0);
 }