コード例 #1
0
        public ModelTest(ATestTwoSample test,
                         string applicability,
                         double test_statistic_value,
                         double p_value)
        {
            this.Title                    = test.TestName;
            this.Applicability            = applicability;
            this.null_hypothesis          = test.NullHypothesis;
            this.NullHypothesisString     = ToolsEnum.EnumToString(test.NullHypothesis);
            this.TestStatisticName        = test.TestStatisticName;
            this.test_statistic_value     = test_statistic_value;
            this.TestStatisticValueString = test_statistic_value.ToString("0.####");
            this.p_value                  = p_value;
            this.PValueString             = p_value.ToString("0.####");

            this.TestRequirementList = new ObservableCollection <ModelTestRequirement>();
            foreach (TestRequirement requirement in test.Requirements)
            {
                TestRequirementList.Add(new ModelTestRequirement(requirement));
            }

            this.TestAssumptionist = new ObservableCollection <ModelTestAssertion>();
            foreach (TestAssertion assertion in test.Assumptions)
            {
                TestAssumptionist.Add(new ModelTestAssertion(assertion));
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: lixiaokui1981/GisStudyOK
 private void button3_Click(object sender, EventArgs e)
 {
     curTools = ToolsEnum.ORDER;//代表重抽一题
     timer2.Start();
     button2.Enabled = true;
     button1.Enabled = false;
     button3.Enabled = false;
 }
コード例 #3
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine(Name + " " + ToolsEnum.EnumToString(DataLevel));
            //public IList<string> ValueStrings { get; private set; }
            //public int ValueCount { get { return ValueStrings.Count; } }
            return(builder.ToString());
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: lixiaokui1981/GisStudyOK
 private void button1_Click(object sender, EventArgs e)
 {
     curTools        = ToolsEnum.NAMEANDORDER;//代表既点名又抽题
     button1.Enabled = false;
     button2.Enabled = true;
     button3.Enabled = false;
     timer1.Start();
     pictureBox1.Image = Image.FromFile("C:\\Data\\pukeImage\\0_1.jpg");
 }
コード例 #5
0
        public void setTool()
        {
            Dropdown dropdown = UIToolSelect.GetComponent <Dropdown>();

            switch (dropdown.value)
            {
            case 0:

                currentTool = ToolsEnum.MAP_BRUSH;
                mapObject.GetComponent <MeshRenderer>().material = materialMatchingToToolMode[0];
                break;

            case 1:
                currentTool = ToolsEnum.DIFFICULTY_PAINTING;
                mapObject.GetComponent <MeshRenderer>().material = materialMatchingToToolMode[1];
                break;
            }
        }
コード例 #6
0
 public ModelTestAssertion(TestAssertion asserrtion)
 {
     Title         = ToolsEnum.EnumToString(asserrtion);
     TestAssertion = asserrtion;
 }
コード例 #7
0
 public ModelTestRequirement(TestRequirement requirement)
 {
     this.Title           = ToolsEnum.EnumToString(requirement);
     this.TestRequirement = requirement;
 }
コード例 #8
0
 public static void WriteEnum <EnumType>(this BinaryWriter writer, EnumType value)
 {
     writer.Write(ToolsEnum.EnumToInt32(value));
 }
コード例 #9
0
 public static EnumType ReadEnum <EnumType>(this BinaryReader reader)
 {
     return(ToolsEnum.Int32ToEnum <EnumType>(reader.ReadInt32()));
 }
コード例 #10
0
ファイル: ToolsPrice.cs プロジェクト: kozzion/KozzionTrading
        public static List <PriceCandle> GetPriceCandles(TradingSymbol trading_symbol, TimeScale time_scale, DateTime start_inclusive, DateTime end_exclusive)
        {
            string data_path = Path.Combine(binary_data_root_path, trading_symbol.Broker, trading_symbol.Account, trading_symbol.Symbol, ToolsEnum.EnumToString(time_scale));

            if (!Directory.Exists(data_path))
            {
                throw new Exception("No data for trading symbol: " + trading_symbol);
            }
            string[] files = Directory.GetFiles(data_path);
            if (files.Length == 0)
            {
                throw new Exception("No data for trading symbol: " + trading_symbol);
            }

            return(ToolsIOSerialization.SerializeFromFile <List <PriceCandle> >(files[0]));
        }
コード例 #11
0
ファイル: ToolsPrice.cs プロジェクト: kozzion/KozzionTrading
        public static IReadOnlyList <PriceCandle> GetPriceCandles(TradingSymbol trading_symbol, TimeScale time_scale)
        {
            string data_path = Path.Combine(binary_data_root_path, trading_symbol.Broker, trading_symbol.Account, trading_symbol.Symbol, ToolsEnum.EnumToString(time_scale));

            if (!Directory.Exists(data_path))
            {
                throw new Exception("No data for trading symbol: " + trading_symbol);
            }
            string[] files = Directory.GetFiles(data_path);
            if (files.Length == 0)
            {
                throw new Exception("No data for trading symbol: " + trading_symbol);
            }

            using (BinaryReader reader = new BinaryReader(new FileStream(files[0], FileMode.Open)))
            {
                int count = reader.ReadInt32();
                List <PriceCandle> candles = new List <PriceCandle>(count);
                for (int candle_index = 0; candle_index < count; candle_index++)
                {
                    candles.Add(PriceCandle.Read(reader));
                }
                return(candles);
            }
        }