コード例 #1
0
        /// <inheritdoc />
        public SMA <TKey, TValue, TCursor> Clone() // [MethodImpl(MethodImplOptions.AggressiveInlining)]
        {
            var instance = new SMA <TKey, TValue, TCursor>
            {
                _cursor = _cursor.Clone(),
                State   = State
            };

            return(instance);
        }
コード例 #2
0
        /// <inheritdoc />
        public SMA <TKey, TValue, TCursor> Initialize() // This causes SO when deeply nested [MethodImpl(MethodImplOptions.AggressiveInlining)]
        {
            var instance = new SMA <TKey, TValue, TCursor>
            {
                _cursor = _cursor.Initialize(),
                State   = CursorState.Initialized
            };

            return(instance);
        }
コード例 #3
0
        SMA <TKey, TValue>(this ISeries <TKey, TValue> series, TKey width, Lookup lookup = Lookup.GE)
        {
            var cursor = new SMA <TKey, TValue, Cursor <TKey, TValue> >(series.GetSpecializedCursor(), width, lookup);

            return(cursor.Source);
        }
コード例 #4
0
        SMA <TKey, TValue>(this ISeries <TKey, TValue> series, int count, bool allowIncomplete = false)
        {
            var cursor = new SMA <TKey, TValue, Cursor <TKey, TValue> >(series.GetSpecializedCursor(), count, allowIncomplete);

            return(cursor.Source);
        }