<commit_before>/****************************** BIG WARNING ********************
 *   Only the code in TA-Lib-Core for .NET is mature.
 * 
 *   All code in TA-Lib-Timeseries is in development and is 
 *   not yet ready for use in applications.
 ****************************** BIG WARNING ********************/

using System;
using System.Collections.Generic;
using System.Text;
using TA.Lib;

namespace Tests
{
    class CoreTests
    {
        public CoreTests()
        {
            simpleMACall();
            averageTrueRangeTest();
        }

        void simpleMACall()
        {
            // Fill up some input with dummy data.
            double[] input = new double[10];
            double []output = new double[10];
            for( int i=0; i < 10; i++ )
            {        
               input[i] = (double)i; 
            }

            // Perform the call.
            int outBegIdx;
            int outNbElement;
            Core.SMA(0, 9, input, 2, out outBegIdx, out outNbElement, output);
        }

        void averageTrueRangeTest()
        {
            // Fill up some input with dummy data.
            double[] input = new double[10];
            double[] output = new double[10];
            for (int i = 0; i < 10; i++)
            {
                input[i] = (double)i;
            }

            // Perform the call.
            int outBegIdx;
            int outNbElement;
            Core.ATR(0, 9, input, input, input, 4, out outBegIdx, out outNbElement, output);
        }

    }
}
<commit_msg>Fix related to circular buffer.<commit_after>using System;
using System.Collections.Generic;
using System.Text;
using TA.Lib;

namespace Tests
{
    class CoreTests
    {
        public CoreTests()
        {
            simpleMACall();
            averageTrueRangeTest();
            callMFI();
            callHT();
        }

        void simpleMACall()
        {
            // Fill up some input with dummy data.
            double[] input = new double[10];
            double []output = new double[10];
            for( int i=0; i < 10; i++ )
            {        
               input[i] = (double)i; 
            }

            // Perform the call.
            int outBegIdx;
            int outNbElement;
            Core.SMA(0, 9, input, 2, out outBegIdx, out outNbElement, output);
        }

        void averageTrueRangeTest()
        {
            // Fill up some input with dummy data.
            double[] input = new double[10];
            double[] output = new double[10];
            for (int i = 0; i < 10; i++)
            {
                input[i] = (double)i;
            }

            // Perform the call.
            int outBegIdx;
            int outNbElement;
            Core.ATR(0, 9, input, input, input, 4, out outBegIdx, out outNbElement, output);
        }

        void callMFI()
        {
            // Fill up some input with dummy data.
            double[] input = new double[10];
            int[] inputInt = new int[10];
            double[] output = new double[10];
            for (int i = 0; i < 10; i++)
            {
                input[i] = (double)i;
            }

            // Perform the call.
            int outBegIdx;
            int outNbElement;
            Core.MFI(0, 9, input, input, input, inputInt, 4, out outBegIdx, out outNbElement, output);
        }

        void callHT()
        {
            // Fill up some input with dummy data.
            double[] input = new double[200];
            double[] output = new double[200];
            for (int i = 0; i < 200; i++)
            {
                input[i] = (double)i;
            }

            // Perform the call.
            int outBegIdx;
            int outNbElement;
            Core.HT_DCPERIOD(0, 199, input, out outBegIdx, out outNbElement, output);
        }

    }
}

{'fraction_non_alphanumeric': 0.1256844850065189, 'fraction_numerical': 0.017209908735332465, 'mean_word_length': 1.3433109346365302, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7562513', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1063, 'n_words': 328}