Aspose.Tasks for C++
RiskItemStatistics.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="RiskItemStatistics.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/object.h>
9 #include <cstdint>
10 
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 class Duration;
18 namespace RiskAnalysis
19 {
20 template <typename> class Percentile;
21 namespace Reporting
22 {
23 class RiskReportBuilder;
24 } // namespace Reporting
25 class RiskItemStatisticsCollection;
26 enum class RiskItemType;
27 class RiskValueCollection;
28 class SampleCollector;
29 } // namespace RiskAnalysis
30 class Task;
31 } // namespace Tasks
32 } // namespace Aspose
33 namespace System
34 {
35 class DateTime;
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 RiskItemStatisticsCollection;
57  friend class Aspose::Tasks::RiskAnalysis::Reporting::RiskReportBuilder;
58  friend class SampleCollector;
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 
104  ASPOSE_TASKS_SHARED_API void AddSample(System::DateTime value);
105  #ifdef ASPOSE_GET_SHARED_MEMBERS
106  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
107  #endif
108 
109 
110 private:
111 
112  RiskItemType itemType;
113  System::SharedPtr<Task> task;
114  System::SharedPtr<RiskValueCollection> riskValues;
115  System::SharedPtr<Percentile<System::DateTime>> percentile;
116 
117 };
118 
119 } // namespace RiskAnalysis
120 } // namespace Tasks
121 } // namespace Aspose
122 
123 
Represents duration in a project.
Definition: Duration.h:161
Represents a collection containing the instances of the RiskItemStatistics class.
Definition: RiskItemStatisticsCollection.h:50
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...
Aspose.
Definition: Asn.h:13