/// <summary>
    /// Initializes a new instance of the <see cref="FractionNumericMatrixFactor" /> class.
    /// </summary>
    /// <param name="group">if set to <see langword="true" /> [group].</param>
    /// <param name="groupingStyle">The grouping style.</param>
    /// <param name="items">The items.</param>
    /// <param name="editableCells">if set to <see langword="true" /> [editable cells].</param>
    /// <param name="exponent">The exponent.</param>
    /// <param name="sequence">The sequence.</param>
    /// <param name="editable">if set to <see langword="true" /> [editable].</param>
    public FractionNumericMatrixFactor(bool group, BarStyles groupingStyle, double[,] items, bool editableCells = false, IExpression?exponent = null, INumeric?sequence = null, bool editable = false)
    {
        _ = exponent;
        _ = sequence;

        Parent  = null;
        NumRows = items.GetLength(0);
        NumCols = items.GetLength(1);
        //UniformRowSize = true;
        //UniformColSize = true;
        Group         = group;
        GroupingStyle = groupingStyle;

        Items = new FractionFactor[NumRows, NumCols];
        for (var row = 0; row < NumRows; row++)
        {
            for (var col = 0; col < NumCols; col++)
            {
                Items[row, col] = new FractionFactor(items[row, col]);
                if (Items[row, col] is IExpression c)
                {
                    c.Parent   = this;
                    c.Editable = editableCells;
                }
            }
        }

        Editable = editable;
    }
Beispiel #2
0
    /// <summary>
    /// Initializes a new instance of the <see cref="MatrixFactor" /> class.
    /// </summary>
    /// <param name="rows">The rows.</param>
    /// <param name="cols">The cols.</param>
    /// <param name="uniformRowSize">if set to <see langword="true" /> [uniform row size].</param>
    /// <param name="uniformColSize">if set to <see langword="true" /> [uniform col size].</param>
    /// <param name="group">if set to <see langword="true" /> [group].</param>
    /// <param name="groupingStyle">The grouping style.</param>
    /// <param name="editable">if set to <see langword="true" /> [editable].</param>
    /// <param name="items">The items.</param>
    public MatrixFactor(int rows, int cols, bool uniformRowSize, bool uniformColSize, bool group, BarStyles groupingStyle, bool editable = false, params ProductTerm[] items)
    {
        Parent         = null;
        NumRows        = rows;
        NumCols        = cols;
        UniformRowSize = uniformRowSize;
        UniformColSize = uniformColSize;
        Group          = group;
        GroupingStyle  = groupingStyle;

        Items = new ProductTerm[rows, cols];
        for (int i = 0, row = 0; row < NumRows; row++)
        {
            for (var col = 0; col < NumCols; col++, i++)
            {
                if (i >= items.Length)
                {
                    break;
                }

                Items[row, col] = items[i];
                if (Items[row, col] is IChild c)
                {
                    c.Parent = this;
                }
            }
            if (i >= items.Length)
            {
                break;
            }
        }

        Editable = editable;
    }
    /// <summary>
    /// Initializes a new instance of the <see cref="CustomFunction" /> class.
    /// </summary>
    /// <param name="parent">The parent.</param>
    /// <param name="functionName">Name of the function.</param>
    /// <param name="variableName">Name of the variable.</param>
    /// <param name="argument">The argument.</param>
    /// <param name="sequence">The sequence.</param>
    /// <param name="exponent">The exponent.</param>
    /// <param name="groupingStyle">The grouping style.</param>
    public CustomFunction(IExpression?parent, string functionName, string variableName, IExpression?argument, INumeric?sequence = null, IExpression?exponent = null, BarStyles groupingStyle = BarStyles.None)
    {
        Parent       = parent;
        FunctionName = functionName.Italicize();
        VariableName = variableName.Italicize();
        Argument     = argument;
        if (Argument is IChild a)
        {
            a.Parent = this;
        }

        Sequence = sequence;
        if (Sequence is IChild s)
        {
            s.Parent = this;
        }

        Exponent = exponent;
        if (Exponent is IChild e)
        {
            e.Parent = this;
        }

        GroupingStyle = groupingStyle;
    }
 /// <summary>
 /// Initializes a new instance of the <see cref="GroupingExpression" /> class.
 /// </summary>
 /// <param name="contents">The contents.</param>
 /// <param name="leftBarStyle">The left bar style.</param>
 /// <param name="rightBarStyle">The right bar style.</param>
 /// <param name="editable">if set to <see langword="true" /> [editable].</param>
 public GroupingExpression(IExpression contents, BarStyles leftBarStyle, BarStyles rightBarStyle, bool editable = false)
 {
     Parent   = null;
     Contents = contents;
     if (Contents is IChild c)
     {
         c.Parent = this;
     }
     LeftBarStyle  = leftBarStyle;
     RightBarStyle = rightBarStyle;
     Editable      = editable;
 }
Beispiel #5
0
        /// <summary>
        /// Bar series를 초기화 합니다.
        /// </summary>
        /// <param name="barSeries"></param>
        /// <param name="Yaxis"></param>
        /// <param name="style"></param>
        /// <param name="boolTime"></param>
        /// <param name="colorEach"></param>
        /// <param name="markVisible"></param>
        public static void InitBarSeries(Bar barSeries, VerticalAxis Yaxis, BarStyles style, bool boolTime,
                                         bool colorEach, bool markVisible)
        {
            barSeries.BarStyle         = style;
            barSeries.VertAxis         = Yaxis;
            barSeries.XValues.DateTime = boolTime;
            barSeries.Marks.Visible    = false;

            barSeries.ColorEach = colorEach;
            MarkView(barSeries, markVisible);

            barSeries.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(153)), ((System.Byte)(153)));
            barSeries.Pen.Color   = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(128)));
        }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CosineFunction"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="argument">The argument.</param>
 /// <param name="groupingStyle">The grouping style.</param>
 public CosineFunction(IExpression?parent, IExpression?argument, INumeric?sequence = null, IExpression?exponent = null, BarStyles groupingStyle = BarStyles.None)
 {
     Parent   = parent;
     Argument = argument;
     if (Argument is IChild a)
     {
         a.Parent = this;
     }
     Sequence = sequence;
     if (Sequence is IChild s)
     {
         s.Parent = this;
     }
     Exponent = exponent;
     if (Exponent is IChild e)
     {
         e.Parent = this;
     }
     GroupingStyle = groupingStyle;
 }
    /// <summary>
    /// Initializes a new instance of the <see cref="FractionNumericMatrixFactor" /> class.
    /// </summary>
    /// <param name="group">if set to <see langword="true" /> [group].</param>
    /// <param name="groupingStyle">The grouping style.</param>
    /// <param name="items">The items.</param>
    /// <param name="exponent">The exponent.</param>
    /// <param name="sequence">The sequence.</param>
    /// <param name="editable">if set to <see langword="true" /> [editable].</param>
    public FractionNumericMatrixFactor(bool group, BarStyles groupingStyle, FractionFactor[,] items, IExpression?exponent = null, INumeric?sequence = null, bool editable = false)
    {
        Parent  = null;
        NumRows = items.GetLength(0);
        NumCols = items.GetLength(1);
        //UniformRowSize = true;
        //UniformColSize = true;
        Group         = group;
        GroupingStyle = groupingStyle;

        Items = items;
        for (int i = 0, row = 0; row < NumRows; row++)
        {
            for (var col = 0; col < NumCols; col++, i++)
            {
                if (Items[row, col] is IChild c)
                {
                    c.Parent = this;
                }
            }
            if (i >= items.Length)
            {
                break;
            }
        }

        Sequence = sequence;
        if (Sequence is IChild s)
        {
            s.Parent = this;
        }

        Exponent = exponent;
        if (Exponent is IChild e)
        {
            e.Parent = this;
        }

        Editable = editable;
    }
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CosineFunction"/> class.
 /// </summary>
 /// <param name="argument">The argument.</param>
 /// <param name="sequence">The sequence.</param>
 /// <param name="exponent">The exponent.</param>
 /// <param name="groupingStyle">The grouping style.</param>
 public CosineFunction(IExpression?argument, INumeric?sequence = null, IExpression?exponent = null, BarStyles groupingStyle = BarStyles.None)
     : this(null, argument, sequence, exponent, groupingStyle)
 {
 }
Beispiel #9
0
 /// <summary>
 /// Initialize the items.
 /// </summary>
 /// <param name="rows">The rows.</param>
 /// <param name="cols">The cols.</param>
 /// <param name="uniformRowSize">if set to <see langword="true" /> [uniform row size].</param>
 /// <param name="uniformColSize">if set to <see langword="true" /> [uniform col size].</param>
 /// <param name="group">if set to <see langword="true" /> [group].</param>
 /// <param name="groupingStyle">The grouping style.</param>
 /// <param name="items">The items.</param>
 public MatrixFactor(int rows, int cols, bool uniformRowSize, bool uniformColSize, bool group, BarStyles groupingStyle, params ProductTerm[] items)
     : this(rows, cols, uniformRowSize, uniformColSize, group, groupingStyle, false, items)
 {
 }
Beispiel #10
0
 /// <summary>
 /// Initialize the items.
 /// </summary>
 /// <param name="rows">The rows.</param>
 /// <param name="cols">The cols.</param>
 /// <param name="group">if set to <see langword="true" /> [group].</param>
 /// <param name="groupingStyle">The grouping style.</param>
 /// <param name="items">The items.</param>
 public MatrixFactor(int rows, int cols, bool group, BarStyles groupingStyle, params ProductTerm[] items)
     : this(rows, cols, true, true, group, groupingStyle, false, items)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomFunction" /> class.
 /// </summary>
 /// <param name="functionName">Name of the function.</param>
 /// <param name="variableName">Name of the variable.</param>
 /// <param name="argument">The argument.</param>
 /// <param name="sequence">The sequence.</param>
 /// <param name="exponent">The exponent.</param>
 /// <param name="groupingStyle">The grouping style.</param>
 public CustomFunction(string functionName, string variableName, IExpression?argument, INumeric?sequence = null, IExpression?exponent = null, BarStyles groupingStyle = BarStyles.None)
     : this(null, functionName, variableName, argument, sequence, exponent, groupingStyle)
 {
 }