示例#1
0
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput" /> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput" /> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category.</param>
        public void FillInfoOutput(InfoOutput infoOutput, string categoryName = InfoOutput.GeneralCategoryName)
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add(new InfoOutputProperty("RowCount", RowCount),
                                     new InfoOutputProperty("ColumnCount", ColumnCount),
                                     new InfoOutputProperty("Dimension", Dimension),
                                     new InfoOutputProperty("IsSymmetric", true));

            var dataTable = new System.Data.DataTable("Data");

            for (int j = 0; j < Dimension; j++)
            {
                dataTable.Columns.Add(j.ToString(), typeof(double));
            }

            for (int k = 0; k < Dimension; k++)
            {
                var row = dataTable.NewRow();
                for (int j = 0; j < Dimension; j++)
                {
                    row[j] = this[k, j];
                }
                dataTable.Rows.Add(row);
            }
            infoOutputCollection.Add(dataTable);
        }
示例#2
0
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category.</param>
        void IInfoOutputQueriable.FillInfoOutput(InfoOutput infoOutput, string categoryName)
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add(new InfoOutputProperty("RowCount", RowCount),
                                     new InfoOutputProperty("ColumnCount", ColumnCount),
                                     new InfoOutputProperty("SubDiagonalCount", SubDiagonalCount),
                                     new InfoOutputProperty("SuperDiagonalCount", SuperDiagonalCount));

            var dataTable = new System.Data.DataTable("Data");

            for (int j = 0; j < ColumnCount; j++)
            {
                dataTable.Columns.Add(j.ToString(), typeof(double));
            }

            for (int k = 0; k < RowCount; k++)
            {
                var row = dataTable.NewRow();
                for (int j = 0; j < ColumnCount; j++)
                {
                    row[j] = this[k, j];
                }
                dataTable.Rows.Add(row);
            }
            infoOutputCollection.Add(dataTable);
        }
示例#3
0
            /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
            /// </summary>
            /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
            /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category name.</param>
            void IInfoOutputQueriable.FillInfoOutput(InfoOutput infoOutput, string categoryName)
            {
                InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

                infoOutputCollection.Add("Day count convention", DayCountConvention.Name.String);
                infoOutputCollection.Add("Business day convention", BusinessDayConvention.Name.String);
                infoOutputCollection.Add("Coupon frequency", CouponFrequency.Name.String);
            }
示例#4
0
            /// <summary>Gets informations of the current object as a specific <see cref="T:Dodoni.BasicComponents.Containers.InfoOutput"/> instance.
            /// </summary>
            /// <param name="infoOutput">The <see cref="T:Dodoni.BasicComponents.Containers.InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
            /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category.</param>
            public virtual void FillInfoOutput(InfoOutput infoOutput, string categoryName = "General")
            {
                InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

                infoOutputCollection.Add("Tenor", Tenor);
                infoOutputCollection.Add("Start date adjustment", StartDateAdjustment);
                infoOutputCollection.Add("End date adjustment", EndDateAdjustment);
            }
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category name.</param>
        public void FillInfoOutput(InfoOutput infoOutput, string categoryName)
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add("Day count convention", DayCountConvention.Name.String);
            infoOutputCollection.Add("Business day convention", BusinessDayConvention.Name.String);
            infoOutputCollection.Add("Business days to settle", BusinessDaysToSettle);
            infoOutputCollection.Add("Coupon frequency", CouponFrequency.Name.String);
        }
示例#6
0
            /// <summary>Gets informations of the current object as a specific <see cref="T:Dodoni.BasicComponents.Containers.InfoOutput"/> instance.
            /// </summary>
            /// <param name="infoOutput">The <see cref="T:Dodoni.BasicComponents.Containers.InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
            /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category.</param>
            public virtual void FillInfoOutput(InfoOutput infoOutput, string categoryName = "General")
            {
                InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

                infoOutputCollection.Add("Period start month", PeriodStartMonth);
                infoOutputCollection.Add("Period start year offset", PeriodStartYearOffset);
                infoOutputCollection.Add("Tenor", Tenor);
                infoOutputCollection.Add("Start date adjustment", StartDateAdjustment);
                infoOutputCollection.Add("End date adjustment", EndDateAdjustment);
            }
        /// <summary>Gets informations of the current object as a specific <see cref="T:Dodoni.BasicComponents.Containers.InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="T:Dodoni.BasicComponents.Containers.InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category.</param>
        public void FillInfoOutput(InfoOutput infoOutput, string categoryName = "General")
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add("End date", EndDate);
            infoOutputCollection.Add("Spot date adjustment", SpotDateAdjustment);
            infoOutputCollection.Add("Start date adjustment", StartDateAdjustment);
            infoOutputCollection.Add("End date adjustment", EndDateAdjustment);
            infoOutputCollection.Add("Business days to settle", BusinessDaysToSettle);
        }
示例#8
0
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category name.</param>
        /// <remarks>This implementation returns a <see cref="System.Data.DataTable"/> objects which contains the <see cref="System.DateTime"/> objects.</remarks>
        void IInfoOutputQueriable.FillInfoOutput(InfoOutput infoOutput, string categoryName)
        {
            var dateTable = new System.Data.DataTable("Dates");

            dateTable.Columns.Add("Value", typeof(DateTime));
            foreach (DateTime date in m_DateScheduleSet)
            {
                dateTable.Rows.Add(date);
            }
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add(dateTable);

            infoOutputCollection.Add("Holiday calendar", HolidayCalendar.Name.String);
        }
示例#9
0
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category name.</param>
        public void FillInfoOutput(InfoOutput infoOutput, string categoryName)
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add("Rounding rule", RoundingRule.Name.String);
            (BondMarket as IInfoOutputQueriable).FillInfoOutput(infoOutput, categoryName + ".Bond market");
            (SwapMarket as IInfoOutputQueriable).FillInfoOutput(infoOutput, categoryName + ".Swap market");
        }
示例#10
0
        /// <summary>Stores informations of an <see cref="IPolynomial"/> object into a specified <see cref="InfoOutputPackage"/>.
        /// </summary>
        /// <param name="polynomial">The <see cref="IPolynomial"/> object.</param>
        /// <param name="infoOutputPackage">The <see cref="InfoOutputPackage"/> object to store the degree and coefficients of <paramref name="polynomial"/>.</param>
        internal static void FillInfoOutput(IPolynomial polynomial, InfoOutputPackage infoOutputPackage)
        {
            infoOutputPackage.Add("Degree", polynomial.Degree);

            DataTable coefficientDataTable = new DataTable("Coefficients");

            coefficientDataTable.Columns.Add("Order", typeof(int));
            coefficientDataTable.Columns.Add("Coefficient.Real", typeof(double));
            coefficientDataTable.Columns.Add("Coefficient.Imaginary", typeof(double));

            for (int order = 0; order <= polynomial.Degree; order++)
            {
                var coefficient = polynomial.GetCoefficient(order);

                coefficientDataTable.Rows.Add(order, coefficient.Real, coefficient.Imaginary);
            }
            infoOutputPackage.Add(coefficientDataTable);
        }
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category name.</param>
        public void FillInfoOutput(InfoOutput infoOutput, string categoryName)
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add("Business days to settle", BusinessDaysToSettle);
            infoOutputCollection.Add("Fixing lag", FixingLag.Name.String);
            infoOutputCollection.Add("Business day convention", BusinessDayConvention.Name.String);
            infoOutputCollection.Add("Day count convention", DayCountConvention.Name.String);
            infoOutputCollection.Add("Future base point value", FutureBasePointValue);
            infoOutputCollection.Add("Libor rate rounding rule", LiborRateRoundingRule.Name.String);
            infoOutputCollection.Add("Caplet tenor convention", CapletTenorConvention.Name.String);
            infoOutputCollection.Add("Libor index name", LiborIndexName);
        }
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category name.</param>
        public void FillInfoOutput(InfoOutput infoOutput, string categoryName)
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add("Business days to settle", BusinessDaysToSettle);
            infoOutputCollection.Add("Fixing lag", FixingLag.Name.String);
            infoOutputCollection.Add("Fixed leg Business day convention", FixedBusinessDayConvention.Name.String);
            infoOutputCollection.Add("Fixed leg Day count convention", FixedDayCountConvention.Name.String);
            infoOutputCollection.Add("Fixed leg Frequency", FixedFrequency.Name.String);
            infoOutputCollection.Add("Floating leg Business day convention", FloatingBusinessDayConvention.Name.String);
            infoOutputCollection.Add("Floating leg Day count convention", FloatingDayCountConvention.Name.String);
            infoOutputCollection.Add("Floating leg Frequency", FloatingFrequency.Name.String);
        }
示例#13
0
        /// <summary>Gets informations of the current object as a specific <see cref="InfoOutput"/> instance.
        /// </summary>
        /// <param name="infoOutput">The <see cref="InfoOutput"/> object which is to be filled with informations concering the current instance.</param>
        /// <param name="categoryName">The name of the category, i.e. all informations will be added to these category.</param>
        public void FillInfoOutput(InfoOutput infoOutput, string categoryName = InfoOutput.GeneralCategoryName)
        {
            InfoOutputPackage infoOutputCollection = infoOutput.AcquirePackage(categoryName);

            infoOutputCollection.Add("Frequency", m_Frequency.Name);
            infoOutputCollection.Add("Business day convention", m_BusinessDayConvention.Name);

            if ((m_FirstRegularDate != null) && (m_FirstRegularDate.HasValue == true))
            {
                infoOutputCollection.Add("First regular date", m_FirstRegularDate.Value);
            }
            if ((m_LastRegularDate != null) && (m_LastRegularDate.HasValue == true))
            {
                infoOutputCollection.Add("Last regular date", m_LastRegularDate.Value);
            }
            infoOutputCollection.Add("Seed date business day convention", SeedBusinessDayConvention.Name);
            if (m_ReferenceDate != DateTime.MinValue)
            {
                infoOutputCollection.Add("Reference date", m_ReferenceDate);
            }
            m_TimeSpanDescription.FillInfoOutput(infoOutput, categoryName);
        }
示例#14
0
 /// <summary>Adds the property 'Execution time'.
 /// </summary>
 /// <param name="infoOutputCollection">The <see cref="InfoOutputPackage"/> object.</param>
 /// <param name="executionTime">The exection time in milliseconds.</param>
 public static void AddExecutionTime(this InfoOutputPackage infoOutputCollection, long executionTime)
 {
     infoOutputCollection.Add("Execution time", executionTime, Resources.ExecutionTime);
 }
示例#15
0
 /// <summary>Adds the property 'State'.
 /// </summary>
 /// <param name="infoOutputCollection">The <see cref="InfoOutputPackage"/> object.</param>
 /// <param name="state">The state.</param>
 public static void Add(this InfoOutputPackage infoOutputCollection, InfoOutputState state)
 {
     infoOutputCollection.Add("State", state, Resources.State);
 }