Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 87eb81c

Browse files
committed
Minor improvements in XML documentation
1 parent 2b86638 commit 87eb81c

File tree

5 files changed

+78
-4
lines changed

5 files changed

+78
-4
lines changed

ColorSharp/src/LightSpectrums/ALightSpectrum.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ protected ALightSpectrum(AConvertibleColor dataSource=null) : base(dataSource) {
8181
#endregion
8282

8383
/**
84+
* <summary>
8485
* Supposing the light spectrum we have is a discrete sample, this gives us the next data point.
8586
* If the method returns -1.0 , then we suppose we have an "analytic" spectrum, so we don't have samples.
87+
* </summary>
8688
*/
8789
public abstract double GetNextAmplitudeSample (double waveLength);
8890

ColorSharp/src/LightSpectrums/RegularLightSpectrum.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public RegularLightSpectrum (double minWaveLength, double[] amplitudes, double n
7878

7979
#region ALightSpectrum methods
8080

81+
/**
82+
* <inheritdoc />
83+
*/
8184
public override double EvaluateAt (double waveLength)
8285
{
8386
if (waveLength >= MinWaveLength && waveLength <= MaxWaveLength) {
@@ -98,16 +101,25 @@ public override double EvaluateAt (double waveLength)
98101
throw new ArgumentOutOfRangeException ();
99102
}
100103

104+
/**
105+
* <inheritdoc />
106+
*/
101107
public override double GetSupportMinValue()
102108
{
103109
return MinWaveLength;
104110
}
105111

112+
/**
113+
* <inheritdoc />
114+
*/
106115
public override double GetSupportMaxValue()
107116
{
108117
return MaxWaveLength;
109118
}
110119

120+
/**
121+
* <inheritdoc />
122+
*/
111123
public override double GetMaxValueOnSupport ()
112124
{
113125
double max = 0;
@@ -121,11 +133,17 @@ public override double GetMaxValueOnSupport ()
121133
return max;
122134
}
123135

136+
/**
137+
* <inheritdoc />
138+
*/
124139
public override int GetNumberOfDataPoints()
125140
{
126141
return Amplitudes.Length;
127142
}
128143

144+
/**
145+
* <inheritdoc />
146+
*/
129147
public override double GetNextAmplitudeSample (double waveLength)
130148
{
131149
if (waveLength < MinWaveLength && waveLength >= MaxWaveLength) {
@@ -140,6 +158,9 @@ public override double GetNextAmplitudeSample (double waveLength)
140158

141159
#region AConvertibleColor methods
142160

161+
/**
162+
* <inheritdoc />
163+
*/
143164
public override bool IsInsideColorSpace()
144165
{
145166
if (MinWaveLength <= double.Epsilon)

ColorSharp/src/LightSpectrums/TabularLightSpectrum.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,25 @@ public TabularLightSpectrum (List<KeyValuePair<double, double>> amplitudes, ACon
6565

6666
#region ALightSpectrum methods
6767

68+
/**
69+
* <inheritdoc />
70+
*/
6871
public override double GetSupportMinValue ()
6972
{
7073
return RawAmplitudes[0].Key;
7174
}
7275

76+
/**
77+
* <inheritdoc />
78+
*/
7379
public override double GetSupportMaxValue ()
7480
{
7581
return RawAmplitudes[RawAmplitudes.Count-1].Key;
7682
}
7783

84+
/**
85+
* <inheritdoc />
86+
*/
7887
public override double GetMaxValueOnSupport ()
7988
{
8089
double max = 0;
@@ -88,11 +97,17 @@ public override double GetMaxValueOnSupport ()
8897
return max;
8998
}
9099

100+
/**
101+
* <inheritdoc />
102+
*/
91103
public override int GetNumberOfDataPoints ()
92104
{
93105
return RawAmplitudes.Count;
94106
}
95107

108+
/**
109+
* <inheritdoc />
110+
*/
96111
public override double EvaluateAt(double waveLength)
97112
{
98113
if (waveLength < RawAmplitudes[0].Key || waveLength > RawAmplitudes[RawAmplitudes.Count-1].Key) {
@@ -114,8 +129,7 @@ public override double EvaluateAt(double waveLength)
114129
}
115130

116131
/**
117-
* Supposing the light spectrum we have is a discrete sample, this gives us the next data point.
118-
* If the method returns -1.0 , then we suppose we have an "analytic" spectrum, so we don't have samples.
132+
* <inheritdoc />
119133
*/
120134
public override double GetNextAmplitudeSample (double waveLength)
121135
{
@@ -139,6 +153,9 @@ public override double GetNextAmplitudeSample (double waveLength)
139153

140154
#region AConvertibleColor methods
141155

156+
/**
157+
* <inheritdoc />
158+
*/
142159
public override bool IsInsideColorSpace()
143160
{
144161
if (RawAmplitudes[0].Key <= double.Epsilon)

ColorSharp/src/MatchingFunctions/RegularMatchingFunction.cs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ public class RegularMatchingFunction : AMatchingFunction
6767

6868
#region constructors
6969

70-
// Constructor
70+
/**
71+
* <summary>Creates a new regular matching function.</summary>
72+
* <param name="minWaveLength">Lower boundary of the matching function's support.</param>
73+
* <param name="maxWaveLength">Upper boundary of the matching function's support.</param>
74+
* <param name="amplitudes">Data points.</param>
75+
*/
7176
public RegularMatchingFunction (double minWaveLength, double maxWaveLength, double[] amplitudes)
7277
{
7378
MinWaveLength = minWaveLength;
@@ -76,7 +81,12 @@ public RegularMatchingFunction (double minWaveLength, double maxWaveLength, doub
7681
Amplitudes = amplitudes;
7782
}
7883

79-
// Constructor
84+
/**
85+
* <summary>Creates a new regular matching function.</summary>
86+
* <param name="minWaveLength">Lower boundary of the matching function's support.</param>
87+
* <param name="amplitudes">Data points.</param>
88+
* <param name="nmPerStep">Number of nanometers between data points.</param>
89+
*/
8090
public RegularMatchingFunction (double minWaveLength, double[] amplitudes, double nmPerStep)
8191
{
8292
NmPerStep = nmPerStep;
@@ -90,6 +100,9 @@ public RegularMatchingFunction (double minWaveLength, double[] amplitudes, doubl
90100

91101
#region AMatchingFunction implementation
92102

103+
/**
104+
* <inheritdoc />
105+
*/
93106
public override double EvaluateAt (double waveLength)
94107
{
95108
if (waveLength >= MinWaveLength && waveLength <= MaxWaveLength) {
@@ -110,16 +123,25 @@ public override double EvaluateAt (double waveLength)
110123
throw new ArgumentOutOfRangeException ();
111124
}
112125

126+
/**
127+
* <inheritdoc />
128+
*/
113129
public override double GetSupportMinValue ()
114130
{
115131
return MinWaveLength;
116132
}
117133

134+
/**
135+
* <inheritdoc />
136+
*/
118137
public override double GetSupportMaxValue ()
119138
{
120139
return MaxWaveLength;
121140
}
122141

142+
/**
143+
* <inheritdoc />
144+
*/
123145
public override int GetNumberOfDataPoints()
124146
{
125147
return Amplitudes.Length;

ColorSharp/src/MatchingFunctions/TabularMatchingFunction.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public TabularMatchingFunction (List<KeyValuePair<double, double>> tabularData)
5757

5858
#region AMatchingFunction implementation
5959

60+
/**
61+
* <inheritdoc />
62+
*/
6063
public override double EvaluateAt(double waveLength)
6164
{
6265
if (waveLength < TabularData[0].Key || waveLength > TabularData[TabularData.Count-1].Key) {
@@ -84,16 +87,25 @@ TabularData [index + 1].Value - TabularData [index].Value
8487
);
8588
}
8689

90+
/**
91+
* <inheritdoc />
92+
*/
8793
public override double GetSupportMinValue ()
8894
{
8995
return TabularData [0].Key;
9096
}
9197

98+
/**
99+
* <inheritdoc />
100+
*/
92101
public override double GetSupportMaxValue ()
93102
{
94103
return TabularData [TabularData.Count - 1].Key;
95104
}
96105

106+
/**
107+
* <inheritdoc />
108+
*/
97109
public override int GetNumberOfDataPoints()
98110
{
99111
return TabularData.Count;

0 commit comments

Comments
 (0)