Aspose.Tasks for C++
RiskItemStatistics.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="RiskItemStatistics.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/object.h>
9 #include <system/date_time.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
13 
14 namespace Aspose
15 {
16 namespace Tasks
17 {
18 class Duration;
19 namespace RiskAnalysis
20 {
21 template <typename> class Percentile;
22 namespace Reporting
23 {
24 class RiskReportBuilder;
25 } // namespace Reporting
26 class RiskItemStatisticsCollection;
27 enum class RiskItemType;
28 class RiskValueCollection;
29 class SampleCollector;
30 } // namespace RiskAnalysis
31 class Task;
32 } // namespace Tasks
33 } // namespace Aspose
34 namespace System
35 {
36 class String;
37 } // namespace System
38 
39 namespace Aspose {
40 
41 namespace Tasks {
42 
43 namespace RiskAnalysis {
44 
45 /// <summary>
46 /// Represents an item which stores statistical data for the task of the analyzed project.
47 /// </summary>
48 class ASPOSE_TASKS_SHARED_CLASS RiskItemStatistics : public System::Object
49 {
51  typedef System::Object BaseType;
52 
53  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
54  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
55 
56  friend class Aspose::Tasks::RiskAnalysis::SampleCollector;
57  friend class Aspose::Tasks::RiskAnalysis::Reporting::RiskReportBuilder;
59 
60 public:
61 
62  /// <summary>
63  /// Gets an instance of the <see cref="RiskItemType"></see> enumeration.
64  /// </summary>
65  ASPOSE_TASKS_SHARED_API RiskItemType get_ItemType() const;
66  /// <summary>
67  /// Gets the minimum value which was generated during Monte Carlo simulation.
68  /// </summary>
69  ASPOSE_TASKS_SHARED_API System::DateTime get_Minimum() const;
70  /// <summary>
71  /// Gets the maximum value which was generated during Monte Carlo simulation.
72  /// </summary>
73  ASPOSE_TASKS_SHARED_API System::DateTime get_Maximum() const;
74  /// <summary>
75  /// Gets the expected value of the risk item.
76  /// </summary>
77  ASPOSE_TASKS_SHARED_API System::DateTime get_ExpectedValue() const;
78  /// <summary>
79  /// Gets the standard deviation of the risk item.
80  /// </summary>
81  ASPOSE_TASKS_SHARED_API Duration get_StandardDeviation() const;
82 
83  /// <summary>
84  /// Gets a value below which a specified percentage of generated samples fall.
85  /// </summary>
86  /// <param name="percent">the specified percent between 0 and 100.</param>
87  /// <returns>a value below which a specified percentage of generated samples fall.</returns>
88  ASPOSE_TASKS_SHARED_API System::DateTime GetPercentile(int32_t percent);
89  /// <summary>
90  /// Returns short string representation of a risk item.
91  /// The exact details of the representation are unspecified and subject to change.
92  /// </summary>
93  /// <returns>short string which represents RiskItem object.</returns>
94  ASPOSE_TASKS_SHARED_API System::String ToString() const override;
95 
96 protected:
97 
98  ASPOSE_TASKS_SHARED_API System::SharedPtr<RiskValueCollection> get_Values() const;
99 
100  ASPOSE_TASKS_SHARED_API RiskItemStatistics(const System::SharedPtr<Task>& task, RiskItemType itemType, const System::SharedPtr<RiskItemStatisticsCollection>& parentStatisticsCollection);
101 
102  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(RiskItemStatistics, CODEPORTING_ARGS(const System::SharedPtr<Task>& task, RiskItemType itemType, const System::SharedPtr<RiskItemStatisticsCollection>& parentStatisticsCollection));
103  ASPOSE_TASKS_SHARED_API void AddSample(System::DateTime value);
104  #ifdef ASPOSE_GET_SHARED_MEMBERS
105  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
106  #endif
107 
108 
109 private:
110 
111  RiskItemType itemType;
112  System::SharedPtr<Task> task;
113  System::SharedPtr<RiskValueCollection> riskValues;
114  System::SharedPtr<Percentile<System::DateTime>> percentile;
115 
116 };
117 
118 } // namespace RiskAnalysis
119 } // namespace Tasks
120 } // namespace Aspose
121 
122 
Represents duration in a project.
Definition: Duration.h:163
Represents a collection containing the instances of the RiskItemStatistics class.
Definition: RiskItemStatisticsCollection.h:51
Represents an item which stores statistical data for the task of the analyzed project.
Definition: RiskItemStatistics.h:49
Duration get_StandardDeviation() const
Gets the standard deviation of the risk item.
System::DateTime get_Maximum() const
Gets the maximum value which was generated during Monte Carlo simulation.
System::DateTime get_ExpectedValue() const
Gets the expected value of the risk item.
System::DateTime get_Minimum() const
Gets the minimum value which was generated during Monte Carlo simulation.
System::DateTime GetPercentile(int32_t percent)
Gets a value below which a specified percentage of generated samples fall.
RiskItemType get_ItemType() const
Gets an instance of the RiskItemType enumeration.
System::String ToString() const override
Returns short string representation of a risk item. The exact details of the representation are unspe...
Definition: Asn.h:13