Browse Source

distributions: Vladmir's first take at the distributions

pull/36/head
Marcus Cuda 16 years ago
parent
commit
4fe613c977
  1. 57
      lib/Gallio_3.2.517.0/ASL - Apache Software Foundation License.txt
  2. BIN
      lib/Gallio_3.2.517.0/Aga.Controls.dll
  3. 14
      lib/Gallio_3.2.517.0/Gallio License.txt
  4. BIN
      lib/Gallio_3.2.517.0/Gallio.Common.Splash.dll
  5. 1346
      lib/Gallio_3.2.517.0/Gallio.Common.Splash.xml
  6. BIN
      lib/Gallio_3.2.517.0/Gallio.ControlPanel.exe
  7. 18
      lib/Gallio_3.2.517.0/Gallio.ControlPanel.exe.config
  8. 18
      lib/Gallio_3.2.517.0/Gallio.ControlPanel.plugin
  9. BIN
      lib/Gallio_3.2.517.0/Gallio.Echo.exe
  10. 29
      lib/Gallio_3.2.517.0/Gallio.Echo.exe.config
  11. 18
      lib/Gallio_3.2.517.0/Gallio.Echo.plugin
  12. BIN
      lib/Gallio_3.2.517.0/Gallio.Host.Elevated.exe
  13. 26
      lib/Gallio_3.2.517.0/Gallio.Host.Elevated.exe.config
  14. BIN
      lib/Gallio_3.2.517.0/Gallio.Host.Elevated.x86.exe
  15. 26
      lib/Gallio_3.2.517.0/Gallio.Host.Elevated.x86.exe.config
  16. BIN
      lib/Gallio_3.2.517.0/Gallio.Host.exe
  17. 26
      lib/Gallio_3.2.517.0/Gallio.Host.exe.config
  18. BIN
      lib/Gallio_3.2.517.0/Gallio.Host.x86.exe
  19. 26
      lib/Gallio_3.2.517.0/Gallio.Host.x86.exe.config
  20. BIN
      lib/Gallio_3.2.517.0/Gallio.Icarus.XmlSerializers.dll
  21. BIN
      lib/Gallio_3.2.517.0/Gallio.Icarus.exe
  22. 31
      lib/Gallio_3.2.517.0/Gallio.Icarus.exe.config
  23. 129
      lib/Gallio_3.2.517.0/Gallio.Icarus.plugin
  24. BIN
      lib/Gallio_3.2.517.0/Gallio.MsBuildTasks.dll
  25. 20
      lib/Gallio_3.2.517.0/Gallio.MsBuildTasks.plugin
  26. 818
      lib/Gallio_3.2.517.0/Gallio.MsBuildTasks.xml
  27. BIN
      lib/Gallio_3.2.517.0/Gallio.NAntTasks.dll
  28. 20
      lib/Gallio_3.2.517.0/Gallio.NAntTasks.plugin
  29. 684
      lib/Gallio_3.2.517.0/Gallio.NAntTasks.xml
  30. 24
      lib/Gallio_3.2.517.0/Gallio.Navigator.Readme.txt
  31. BIN
      lib/Gallio_3.2.517.0/Gallio.Navigator.exe
  32. 7
      lib/Gallio_3.2.517.0/Gallio.Navigator.exe.config
  33. 22
      lib/Gallio_3.2.517.0/Gallio.Navigator.plugin
  34. BIN
      lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.dll
  35. 404
      lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.dll-Help.xml
  36. 21
      lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.plugin
  37. 660
      lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.xml
  38. BIN
      lib/Gallio_3.2.517.0/Gallio.Reports.dll
  39. 241
      lib/Gallio_3.2.517.0/Gallio.Reports.plugin
  40. 229
      lib/Gallio_3.2.517.0/Gallio.Reports.xml
  41. BIN
      lib/Gallio_3.2.517.0/Gallio.UI.dll
  42. 127
      lib/Gallio_3.2.517.0/Gallio.UI.plugin
  43. 1356
      lib/Gallio_3.2.517.0/Gallio.UI.xml
  44. BIN
      lib/Gallio_3.2.517.0/Gallio.Utility.exe
  45. 26
      lib/Gallio_3.2.517.0/Gallio.Utility.exe.config
  46. 18
      lib/Gallio_3.2.517.0/Gallio.Utility.plugin
  47. BIN
      lib/Gallio_3.2.517.0/Gallio.VisualStudio.Interop.dll
  48. 28
      lib/Gallio_3.2.517.0/Gallio.VisualStudio.Interop.plugin
  49. BIN
      lib/Gallio_3.2.517.0/Gallio.XmlSerializers.dll
  50. BIN
      lib/Gallio_3.2.517.0/Gallio.dll
  51. BIN
      lib/Gallio_3.2.517.0/Gallio.pdb
  52. 654
      lib/Gallio_3.2.517.0/Gallio.plugin
  53. 44319
      lib/Gallio_3.2.517.0/Gallio.xml
  54. BIN
      lib/Gallio_3.2.517.0/Gallio35.dll
  55. BIN
      lib/Gallio_3.2.517.0/Gallio35.pdb
  56. 35
      lib/Gallio_3.2.517.0/Gallio35.plugin
  57. 293
      lib/Gallio_3.2.517.0/Gallio35.xml
  58. BIN
      lib/Gallio_3.2.517.0/Gallio40.dll
  59. BIN
      lib/Gallio_3.2.517.0/Gallio40.pdb
  60. 29
      lib/Gallio_3.2.517.0/Gallio40.plugin
  61. 8
      lib/Gallio_3.2.517.0/Gallio40.xml
  62. BIN
      lib/Gallio_3.2.517.0/ICSharpCode.TextEditor.dll
  63. BIN
      lib/Gallio_3.2.517.0/MbUnit.Compatibility.dll
  64. BIN
      lib/Gallio_3.2.517.0/MbUnit.Compatibility.pdb
  65. 28
      lib/Gallio_3.2.517.0/MbUnit.Compatibility.plugin
  66. 3419
      lib/Gallio_3.2.517.0/MbUnit.Compatibility.xml
  67. BIN
      lib/Gallio_3.2.517.0/MbUnit.dll
  68. 6
      lib/Gallio_3.2.517.0/MbUnit.dll.tdnet
  69. BIN
      lib/Gallio_3.2.517.0/MbUnit.pdb
  70. 54
      lib/Gallio_3.2.517.0/MbUnit.plugin
  71. 11494
      lib/Gallio_3.2.517.0/MbUnit.xml
  72. BIN
      lib/Gallio_3.2.517.0/MbUnit35.dll
  73. BIN
      lib/Gallio_3.2.517.0/MbUnit35.pdb
  74. 30
      lib/Gallio_3.2.517.0/MbUnit35.plugin
  75. 47
      lib/Gallio_3.2.517.0/MbUnit35.xml
  76. BIN
      lib/Gallio_3.2.517.0/MbUnit40.dll
  77. BIN
      lib/Gallio_3.2.517.0/MbUnit40.pdb
  78. 30
      lib/Gallio_3.2.517.0/MbUnit40.plugin
  79. 8
      lib/Gallio_3.2.517.0/MbUnit40.xml
  80. 10
      lib/Gallio_3.2.517.0/Sources.txt
  81. BIN
      lib/Gallio_3.2.517.0/WeifenLuo.WinFormsUI.Docking.dll
  82. 31
      lib/Gallio_3.2.517.0/licenses/CciMetadata.License.txt
  83. 36
      lib/Gallio_3.2.517.0/licenses/Mono.Cecil.license.html
  84. 737
      src/MathNet.Numerics.5.1.ReSharper
  85. 379
      src/Numerics/Distributions/Continuous/Beta.cs
  86. 348
      src/Numerics/Distributions/Continuous/Cauchy.cs
  87. 326
      src/Numerics/Distributions/Continuous/Chi.cs
  88. 303
      src/Numerics/Distributions/Continuous/ChiSquare.cs
  89. 14
      src/Numerics/Distributions/Continuous/ContinuousUniform.cs
  90. 534
      src/Numerics/Distributions/Continuous/Erlang.cs
  91. 332
      src/Numerics/Distributions/Continuous/Exponential.cs
  92. 363
      src/Numerics/Distributions/Continuous/FisherSnedecor.cs
  93. 209
      src/Numerics/Distributions/Continuous/Gamma.cs
  94. 378
      src/Numerics/Distributions/Continuous/InverseGamma.cs
  95. 350
      src/Numerics/Distributions/Continuous/Laplace.cs
  96. 107
      src/Numerics/Distributions/Continuous/LogNormal.cs
  97. 123
      src/Numerics/Distributions/Continuous/Normal.cs
  98. 352
      src/Numerics/Distributions/Continuous/Pareto.cs
  99. 321
      src/Numerics/Distributions/Continuous/Rayleigh.cs
  100. 498
      src/Numerics/Distributions/Continuous/Stable.cs

57
lib/Gallio_3.2.517.0/ASL - Apache Software Foundation License.txt

@ -0,0 +1,57 @@
Apache License, Version 2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
2. You must cause any modified files to carry prominent notices stating that You changed the files; and
3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

BIN
lib/Gallio_3.2.517.0/Aga.Controls.dll

Binary file not shown.

14
lib/Gallio_3.2.517.0/Gallio License.txt

@ -0,0 +1,14 @@
Copyright 2005-2010 Gallio Project - http://www.gallio.org/
Portions Copyright 2000-2004 Jonathan de Halleux
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

BIN
lib/Gallio_3.2.517.0/Gallio.Common.Splash.dll

Binary file not shown.

1346
lib/Gallio_3.2.517.0/Gallio.Common.Splash.xml

File diff suppressed because it is too large

BIN
lib/Gallio_3.2.517.0/Gallio.ControlPanel.exe

Binary file not shown.

18
lib/Gallio_3.2.517.0/Gallio.ControlPanel.exe.config

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="gallio" type="Gallio.Runtime.GallioSectionHandler, Gallio" />
</configSections>
<runtime>
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>

18
lib/Gallio_3.2.517.0/Gallio.ControlPanel.plugin

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.ControlPanel"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Control Panel</name>
<version>3.2.0.0</version>
<description>An application for configuring preferences and managing the Gallio installation.</description>
<icon>plugin://Gallio.ControlPanel/Resources/Gallio.ControlPanel.ico</icon>
</traits>
<files>
<file path="Gallio.ControlPanel.plugin" />
<file path="Gallio.ControlPanel.exe" />
<file path="Gallio.ControlPanel.exe.config" />
<file path="Resources\Gallio.ControlPanel.ico" />
</files>
</plugin>

BIN
lib/Gallio_3.2.517.0/Gallio.Echo.exe

Binary file not shown.

29
lib/Gallio_3.2.517.0/Gallio.Echo.exe.config

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="gallio" type="Gallio.Runtime.GallioSectionHandler, Gallio" />
</configSections>
<runtime>
<!-- Don't kill application on first uncaught exception.
We don't want the test runner to terminate itself unexpectedly
without reporting the test failure associated with that exception. -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
<system.diagnostics>
<assert assertuienabled="false" />
</system.diagnostics>
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>

18
lib/Gallio_3.2.517.0/Gallio.Echo.plugin

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.Echo"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Echo</name>
<version>3.2.0.0</version>
<description>A command-line test runner.</description>
<icon>plugin://Gallio.Echo/Resources/Gallio.Echo.ico</icon>
</traits>
<files>
<file path="Gallio.Echo.plugin" />
<file path="Gallio.Echo.exe" />
<file path="Gallio.Echo.exe.config" />
<file path="Resources\Gallio.Echo.ico" />
</files>
</plugin>

BIN
lib/Gallio_3.2.517.0/Gallio.Host.Elevated.exe

Binary file not shown.

26
lib/Gallio_3.2.517.0/Gallio.Host.Elevated.exe.config

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
<system.diagnostics>
<assert assertuienabled="false" />
</system.diagnostics>
<!-- We select the runtime version by setting the COMPLUS_Version environment variable.
Unfortunately, these settings will override the contents of that variable, so
we cannot use them for the host application.
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
-->
</configuration>

BIN
lib/Gallio_3.2.517.0/Gallio.Host.Elevated.x86.exe

Binary file not shown.

26
lib/Gallio_3.2.517.0/Gallio.Host.Elevated.x86.exe.config

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
<system.diagnostics>
<assert assertuienabled="false" />
</system.diagnostics>
<!-- We select the runtime version by setting the COMPLUS_Version environment variable.
Unfortunately, these settings will override the contents of that variable, so
we cannot use them for the host application.
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
-->
</configuration>

BIN
lib/Gallio_3.2.517.0/Gallio.Host.exe

Binary file not shown.

26
lib/Gallio_3.2.517.0/Gallio.Host.exe.config

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
<system.diagnostics>
<assert assertuienabled="false" />
</system.diagnostics>
<!-- We select the runtime version by setting the COMPLUS_Version environment variable.
Unfortunately, these settings will override the contents of that variable, so
we cannot use them for the host application.
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
-->
</configuration>

BIN
lib/Gallio_3.2.517.0/Gallio.Host.x86.exe

Binary file not shown.

26
lib/Gallio_3.2.517.0/Gallio.Host.x86.exe.config

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
<system.diagnostics>
<assert assertuienabled="false" />
</system.diagnostics>
<!-- We select the runtime version by setting the COMPLUS_Version environment variable.
Unfortunately, these settings will override the contents of that variable, so
we cannot use them for the host application.
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
-->
</configuration>

BIN
lib/Gallio_3.2.517.0/Gallio.Icarus.XmlSerializers.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/Gallio.Icarus.exe

Binary file not shown.

31
lib/Gallio_3.2.517.0/Gallio.Icarus.exe.config

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="OnlineHelpURL" value="http://www.gallio.org/Docs.aspx" />
<add key="GallioWebsiteURL" value="http://www.gallio.org" />
<add key="TaskManager.DefaultQueueId" value="Gallio.Icarus.MainWorker" />
</appSettings>
<runtime>
<!-- Don't kill application on first uncaught exception.
We don't want the test runner to terminate itself unexpectedly
without reporting the test failure associated with that exception. -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
<system.diagnostics>
<assert assertuienabled="false" />
</system.diagnostics>
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>

129
lib/Gallio_3.2.517.0/Gallio.Icarus.plugin

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.Icarus"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Icarus Test Runner</name>
<version>3.2.0.0</version>
<description>A GUI based test runner.</description>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio.UI" />
</dependencies>
<files>
<file path="Gallio.Icarus.plugin" />
<file path="Gallio.Icarus.exe" />
<file path="Gallio.Icarus.exe.config" />
<file path="Gallio.Icarus.XmlSerializers.dll" />
<file path="ICSharpCode.TextEditor.dll" />
<file path="Resources\Gallio.Icarus.ico" />
</files>
<services>
<service serviceId="Gallio.Icarus.OptionsController"
serviceType="Gallio.Icarus.Controllers.Interfaces.IOptionsController, Gallio.Icarus" />
</services>
<components>
<component componentId="Gallio.Icarus.Controllers.OptionsController"
serviceId="Gallio.Icarus.OptionsController"
componentType="Gallio.Icarus.Controllers.OptionsController, Gallio.Icarus" />
<!-- Control panel -->
<component componentId="Gallio.Icarus.ControlPanel.RootPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider">
<traits>
<path>Icarus</path>
<order>-75</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.TestStatusPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.TestStatusPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Appearance/Test Status</path>
<order>100</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.StartupPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.StartupPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Startup</path>
<order>200</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.TestExplorerPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.TestExplorerPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Test Explorer</path>
<order>300</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.TreeViewCategoryPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.TreeViewCategoryPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Test Explorer/Tree View Categories</path>
<order>1</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.ReportsPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.ReportsPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Reports</path>
<order>1</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.ProgressMonitoringPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.ProgressMonitoringPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Appearance/Progress Monitoring</path>
<order>1</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.TestRunnerExtensionsPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.TestRunnerExtensionsPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Runner/Test Runner Extensions</path>
<order>1</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
<component componentId="Gallio.Icarus.ControlPanel.TestRunnerFactoryPaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.Icarus.ControlPanel.TestRunnerFactoryPaneProvider, Gallio.Icarus">
<traits>
<path>Icarus/Runner/Test Runner Factory</path>
<order>1</order>
<icon>plugin://Gallio.Icarus/Resources/Gallio.Icarus.ico</icon>
</traits>
</component>
</components>
</plugin>

BIN
lib/Gallio_3.2.517.0/Gallio.MsBuildTasks.dll

Binary file not shown.

20
lib/Gallio_3.2.517.0/Gallio.MsBuildTasks.plugin

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.MSBuildTasks"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio MSBuild Tasks</name>
<version>3.2.0.0</version>
<description>Provides MSBuild tasks for running tests with Gallio.</description>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="Gallio.MSBuildTasks.plugin" />
<file path="Gallio.MSBuildTasks.dll" />
<file path="Gallio.MSBuildTasks.xml" />
</files>
</plugin>

818
lib/Gallio_3.2.517.0/Gallio.MsBuildTasks.xml

@ -0,0 +1,818 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Gallio.MSBuildTasks</name>
</assembly>
<members>
<member name="T:Gallio.MSBuildTasks.Gallio">
<summary>
An MSBuild task that provides support for running Gallio tests.
</summary>
<remarks>
In order for MSBuild to find this task, the Gallio.MSBuildTasks.dll has to be loaded with
the UsingTask directive:
<code>
<![CDATA[
<UsingTask AssemblyFile="[Path-to-assembly]\Gallio.MSBuildTasks.dll" TaskName="Gallio" />
]]>
</code>
The AssemblyFile attribute must be set to the path where the Gallio.MSBuildTasks.dll assembly resides,
and the TaskName attribute <strong>must</strong> be set to "Gallio", otherwise MSBuild won't load the task.
</remarks>
<example>
The following code is an example build file that shows how to load the task, specify the test files
and assemblies and set some of the task's properties:
<code>
<![CDATA[
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is needed by MSBuild to locate the Gallio task -->
<UsingTask AssemblyFile="[Path-to-assembly]\Gallio.MSBuildTasks.dll" TaskName="Gallio" />
<!-- Specify the test files and assemblies -->
<ItemGroup>
<TestFile Include="[Path-to-test-assembly1]/TestAssembly1.dll" />
<TestFile Include="[Path-to-test-assembly2]/TestAssembly2.dll" />
<TestFile Include="[Path-to-test-script1]/TestScript1_spec.rb" />
<TestFile Include="[Path-to-test-script2]/TestScript2.xml" />
</ItemGroup>
<Target Name="RunTests">
<Gallio IgnoreFailures="true" Filter="Type=SomeFixture" Files="@(TestFile)">
<!-- This tells MSBuild to store the output value of the task's ExitCode property
into the project's ExitCode property -->
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</Gallio>
<Error Text="Tests execution failed" Condition="'$(ExitCode)' != 0" />
</Target>
</Project>
]]>
</code>
</example>
</member>
<member name="M:Gallio.MSBuildTasks.Gallio.#ctor">
<summary>
Default constructor.
</summary>
</member>
<member name="M:Gallio.MSBuildTasks.Gallio.Execute">
<inheritdoc />
</member>
<member name="M:Gallio.MSBuildTasks.Gallio.RunLauncher(Gallio.Runner.TestLauncher)">
<exclude />
<summary>
Provided so that the unit tests can override test execution behavior.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.Files">
<summary>
The list of relative or absolute paths of test files, projects and assemblies to execute.
Wildcards may be used. This is required.
</summary>
<example>The following example shows how to specify the test files, projects and assemblies
(for a more complete example please see the <see cref="T:Gallio.MSBuildTasks.Gallio"/> task documentation):
<code>
<![CDATA[
<!-- Specify the test files, projects and assemblies -->
<ItemGroup>
<TestFile Include="[Path-to-test-assembly1]/TestAssembly1.dll" />
<TestFile Include="[Path-to-test-assembly2]/TestAssembly2.dll" />
<TestFile Include="[Path-to-test-script1]/TestScript1_spec.rb" />
<TestFile Include="[Path-to-test-script2]/TestScript2.xml" />
</ItemGroup>
<Target Name="MyTarget">
<Gallio Files="@(TestFile)" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.HintDirectories">
<summary>
The list of directories used for loading referenced assemblies and other dependent resources.
</summary>
<example>The following example shows how to specify the hint directories:
<code>
<![CDATA[
<ItemGroup>
<HintDirectory Include="[Path-to-test-hint-directory-1]/" />
<HintDirectory Include="[Path-to-test-hint-directory-2]/" />
</ItemGroup>
<Target Name="MyTarget">
<Gallio HintDirectories="@(HintDirectory)" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.PluginDirectories">
<summary>
Additional Gallio plugin directories to search recursively.
</summary>
<example>The following example shows how to specify the plugins directories:
<code>
<![CDATA[
<ItemGroup>
<PluginDirectory Include="[Path-to-test-plugin-directory-1]/" />
<PluginDirectory Include="[Path-to-test-plugin-directory-2]/" />
</ItemGroup>
<Target Name="MyTarget">
<Gallio PluginDirectories="@(PluginDirectory)" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ApplicationBaseDirectory">
<summary>
<para>
Gets or sets the relative or absolute path of the application base directory,
or null to use a default value selected by the consumer.
</para>
<para>
If relative, the path is based on the current working directory,
so a value of "" causes the current working directory to be used.
</para>
<para>
The default is null.
</para>
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.WorkingDirectory">
<summary>
<para>
Gets or sets the relative or absolute path of the working directory
or null to use a default value selected by the consumer.
</para>
<para>
If relative, the path is based on the current working directory,
so a value of "" causes the current working directory to be used.
</para>
<para>
The default is null.
</para>
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ShadowCopy">
<summary>
<para>
Enables shadow copying when set to true.
</para>
<para>
Shadow copying allows the original assemblies to be modified while the tests are running.
However, shadow copying may occasionally cause some tests to fail if they depend on their original location.
</para>
<para>
The default is false.
</para>
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.Debug">
<summary>
<para>
Attaches the debugger to the test process when set to true.
</para>
<para>
The default is false.
</para>
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.RuntimeVersion">
<summary>
<para>
Gets or sets the version of the .Net runtime to use for running tests.
</para>
<para>
For the CLR, this must be the name of one of the framework directories in %SystemRoot%\Microsoft.Net\Framework. eg. 'v2.0.50727'.
</para>
<para>
The default is null which uses the most recent installed and supported framework.
</para>
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ReportTypes">
<summary>
A list of the types of reports to generate, separated by semicolons.
</summary>
<remarks>
<list type="bullet">
<item>The types supported "out of the box" are: Html, Html-Condensed, Text, Text-Condendes, XHtml,
XHtml-Condensed, MHtml, MHtml-CondensedXml, and Xml-Inline, but more types could be available as plugins.</item>
<item>The report types are not case sensitive.</item>
</list>
</remarks>
<example>
In the following example reports will be generated in both HTML and XML format:
<code>
<![CDATA[
<Target Name="MyTarget">
<Gallio ReportTypes="html;xml" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ReportArchive">
<summary>
Sets the report archive mode.
</summary>
<remarks>
<para>
The supported modes are:
<list type="bullet">
<item>Normal (default)</item>
<item>Zip</item>
</list>
</para>
</remarks>
<example>
In the following example, reports will be enclosed in a zip file:
<code>
<![CDATA[
<Target Name="MyTarget">
<Gallio ReportArchive="zip" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ReportNameFormat">
<summary>
Sets the format string to use to generate the reports filenames.
</summary>
<remarks>
Any occurence of {0} will be replaced by the date, and any occurrence of {1} by the time.
The default format string is test-report-{0}-{1}.
</remarks>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ReportDirectory">
<summary>
Sets the name of the directory where the reports will be put.
</summary>
<remarks>
The directory will be created if it doesn't exist. Existing files will be overwritten.
The default report directory is "Reports".
</remarks>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.RunnerType">
<summary>
Sets the type of test runner to use.
</summary>
<remarks>
<list type="bullet">
<item>The types supported "out of the box" are: Local, IsolatedAppDomain
and IsolatedProcess (default), but more types could be available as plugins.</item>
<item>The runner types are not case sensitive.</item>
</list>
</remarks>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.RunnerExtensions">
<summary>
<para>
Specifies the type, assembly, and parameters of custom test runner
extensions to use during the test run in the form:
'[Namespace.]Type,Assembly[;Parameters]'.
</para>
<para>
eg. 'FancyLogger,MyCustomExtensions.dll;SomeParameters'
</para>
</summary>
<remarks>
Since semicolons are used to delimit multiple property values in MSBuild,
it may be necessary to escape semicolons that appear as part of test
runner extension specifications to ensure MSBuild does not misinterpret them.
An escaped semicolon may be written as "%3B" in the build file.
</remarks>
<example>
The following example runs tests using a custom logger extension:
<code>
<![CDATA[
<Target Name="MyTarget">
<Gallio Files="MyTestAssembly.dll" RunnerExtensions="FancyLogger,MyExtensions.dll%3BColorOutput,FancyIndenting" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.RunnerProperties">
<summary>
Specifies option property key/value pairs for the test runner.
</summary>
<example>
The following example specifies some extra NCover arguments.
<code>
<![CDATA[
<gallio>
<Target Name="MyTarget">
<Gallio Files="MyTestAssembly.dll" RunnerExtensions="NCoverArguments='//eas Gallio'" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ReportFormatterProperties">
<summary>
Specifies option property key/value pairs for the report formatter.
</summary>
<example>
The following example changes the default attachment content disposition for the reports.
<code>
<![CDATA[
<Target Name="MyTarget">
<Gallio Files="MyTestAssembly.dll" RunnerExtensions="AttachmentContentDisposition=Absent" />
</Target>
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.Filter">
<summary>
<para>
Sets the filter set to apply, which consists of a sequence of one or more inclusion
or exclusion filter rules prefixed using 'include' (optional) or 'exclude'.
</para>
</summary>
<remarks>
<para>
A filter rule consists of zero or more filter expressions
that may be combined using 'and', 'or', and 'not' and grouped with
parentheses. A filter expression consists of a filter key followed by one or
more comma-delimited matching values in the form 'key: value, "quoted value",
/regular expression/'.
</para><para>
The filter grammar is defined as follows:
</para><para>
<code><![CDATA[
INCLUDE ::= "include" # Not case-sensitive
EXCLUDE ::= "exclude" # Not case-sensitive
OR ::= "or" # Not case-sensitive
AND ::= "and" # Not case-sensitive
NOT ::= "not" # Not case-sensitive
<unquotedWord> ::= [^:,*()/\"']+
<quotedWord> ::= '"' .* '"' # String delimited by double quotation marks
| "'" .* "'" # String delimited by single quotation marks
<word> ::= <unquotedWord>
| <quotedWord>
<regexWord> ::= "/" .* "/" # Regular expression
| "/" .* "/i" # Case-insensitive regular expression
<key> ::= <word>
<value> ::= <word> # Value specified by exact string
| <regexWord> # Value specified by regular expression
<matchSequence> ::= <value> (',' <value>)* # One or more comma-separated values
<filterExpr> ::= "*" # "Any"
| <key> ":" matchSeq>
| <filterExpr> OR filterExpr> # Combine filter expressions with OR
| <filterExpr> AND filterExpr> # Combine filter expressions with AND
| NOT <filterExpr> # Negate filter expression
| "(" <filterExpr> ")" # Grouping filter expression
<filterRule> ::= <filterExpr> # Inclusion rule (default case)
| INCLUDE <filterExpr> # Inclusion rule
| EXCLUDE <filterExpr> # Exclusion rule
<filterSet> ::= <filterRule> # Filter set consists of at least one filter rule.
| <filterRule> <filterSet> # But may be a sequence of rules.
]]></code>
</para><list type="bullet">
<item>By default this property takes the value "*", which means the "Any" filter will be applied.</item>
<item>
The operator precedence is, from highest to lowest: NOT, AND, and OR. All these operators are
left-associative.
</item>
<item>
The commas used to separate the values are interpreted as OR operators, so "Type:Fixture1,Fixture2"
is equivalent to "Type:Fixture1 or Type:Fixture2".
</item>
<item>
White-space is ignored outside quoted strings, so "Type:Fixture1|Type:Fixture2" is equivalent
to "Type : Fixture1 | Type : Fixture2".
</item>
<item>
Commas, colons, slashes, backslashes and quotation marks can be escaped with a backslash. For
example, \' will be interpreted as '. Using a single backslash in front of any other character
is invalid.
</item>
<item>
Currently the following filter keys are recognized:
<list type="bullet">
<item>Id: Filter by id.</item>
<item>Name: Filter by name.</item>
<item>Assembly: Filter by assembly name.</item>
<item>Namespace: Filter by namespace name.</item>
<item>Type: Filter by type name, including inherited types.</item>
<item>ExactType: Filter by type name, excluding inherited types.</item>
<item>Member: Filter by member name.</item>
<item>
*: All other names are assumed to correspond to metadata keys. See <see cref="T:Gallio.Model.MetadataKeys"/> for standard metadata keys. Common keys are: AuthorName, Category, Description, Importance, TestsOn. <seealso cref="T:Gallio.Model.MetadataKeys"/>
</item>
</list>
</item>
</list>
</remarks>
<example>
<para>
Assuming the following fixtures have been defined:
</para><code><![CDATA[
[TestFixture]
[Category("UnitTest")]
[Author("AlbertEinstein")]
public class Fixture1
{
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
}
[TestFixture]
[Category("IntegrationTest")]
public class Fixture2
{
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
}
]]></code><para>The following filters could be applied:</para><list type="bullet">
<item>
<term>Type: Fixture1</term>
<description>All the tests within Fixture1 will be run.</description>
</item>
<item>
<term>Member: Test1</term>
<description>Only Fixture1.Test1 and Fixture2.Test1 will be run.</description>
</item>
<item>
<term>Type: Fixture1, Fixture2</term>
<description>All the tests within Fixture1 or Fixture2 will be run.</description>
</item>
<item>
<term>Type:Fixture1 or Type:Fixture2</term>
<description>All the tests within Fixture1 or Fixture2 will be run.</description>
</item>
<item>
<term>Type:Fixture1, Fixture2 and Member:Test2</term>
<description>Only Fixture1.Test2 and Fixture2.Test2 will be run.</description>
</item>
<item>
<term>Type:/Fixture*/ and Member:Test2</term>
<description>Only Fixture1.Test2 and Fixture2.Test2 will be run.</description>
</item>
<item>
<term>AuthorName:AlbertEinstein</term>
<description>All the tests within Fixture1 will be run because its author attribute is set to "AlbertEinstein".</description>
</item>
<item>
<term>Category: IntegrationTest</term>
<description>All the tests within Fixture2 will be run because its category attribute is set to "IntegrationTest".</description>
</item>
<item>
<term>("Type": 'Fixture1' and "Member":/Test*/) or (Type : Fixture2 and Member: /Test*/)</term>
<description>All the tests will be run. This example also shows that you can enclose key and
values with quotation marks, and group expressions with parentheses.</description>
</item>
<item>
<term>exclude AuthorName: AlbertEinstein</term>
<description>All the tests within Fixture2 will be run because its author attribute is not set to "AlbertEinstein".</description>
</item>
<item>
<term>exclude Type: Fixture2 include Member: Test2</term>
<description>Only Fixture1.Test2 will be run because Fixture2 was excluded from consideration before the inclusion rule was applied.</description>
</item>
</list>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.IgnoreFailures">
<summary>
Sets whether test failures will be ignored and allow the build to proceed.
When set to <c>false</c>, test failures will cause the build to fail.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ShowReports">
<summary>
Sets whether to show generated reports in a window using the default system application
registered to the report file type.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.DoNotRun">
<summary>
Sets whether to load the tests but not run them. This option may be used to produce a
report that contains test metadata for consumption by other tools.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.IgnoreAnnotations">
<summary>
<para>
Sets whether to ignore annotations when determining the result code.
If false (default), then error annotations, usually indicative of broken tests, will cause
a failure result to be generated.
</para>
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.EchoResults">
<summary>
Sets whether to echo results to the screen as tests finish. If this option is set
to true, the default, test results are echoed to the console
in varying detail depending on the current verbosity level. Otherwise
only final summary statistics are displayed.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.RunTimeLimit">
<summary>
Sets the maximum amount of time (in seconds) the tests can run
before they are canceled. The default is an infinite time to run.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.Verbosity">
<summary>
The verbosity to use when logging. The default is "Normal".
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.ExitCode">
<summary>
Gets the exit code of the tests execution.
</summary>
<remarks>
This property is only meaningful when the IgnoreFailures property is set to true.
</remarks>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's ExitCode output property will
be made available as a property called ExitCode in the project
after the tests have been run: -->
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</Gallio>
<!-- After the exit code be retrieved and used like this: -->
<Error Text="The tests execution failed" Condition="'$(ExitCode)' != 0" />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.TestCount">
<summary>
Gets the total number of test cases run.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's TestCount output property will
be made available as a property called TestCount in the project
after the tests have been run: -->
<Output TaskParameter="TestCount" PropertyName="TestCount" />
</Gallio>
<!-- After execution the number of test cases run can be retrieved like this: -->
<Message Text="$(TestCount) test cases were run." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.StepCount">
<summary>
Gets the total number of test steps run.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's StepCount output property will
be made available as a property called StepCount in the project
after the tests have been run: -->
<Output TaskParameter="StepCount" PropertyName="StepCount" />
</Gallio>
<!-- After execution the number of test steps run can be retrieved like this: -->
<Message Text="$(StepCount) test steps were run." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.PassedCount">
<summary>
Gets the total number of test cases that were run and passed.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's PassedCount output property will
be made available as a property called PassedCount in the project
after the tests have been run: -->
<Output TaskParameter="PassedCount" PropertyName="PassedCount" />
</Gallio>
<!-- After execution the number of passed tests can be retrieved like this: -->
<Message Text="$(PassedCount) tests passed." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.FailedCount">
<summary>
Gets the total number of test cases that were run and failed.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's FailedCount output property will
be made available as a property called FailedCount in the project
after the tests have been run: -->
<Output TaskParameter="FailedCount" PropertyName="FailedCount" />
</Gallio>
<!-- After execution the number of failed tests can be retrieved like this: -->
<Message Text="$(FailedCount) tests passed." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.InconclusiveCount">
<summary>
Gets the total number of test cases that ran and were inconclusive.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's InconclusiveCount output property will
be made available as a property called InconclusiveCount in the project
after the tests have been run: -->
<Output TaskParameter="InconclusiveCount" PropertyName="InconclusiveCount" />
</Gallio>
<!-- After execution the number of inconclusive tests can be retrieved like this: -->
<Message Text="$(InconclusiveCount) tests were inconclusive." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.RunCount">
<summary>
Gets the total number of test cases that were run.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's RunCount output property will
be made available as a property called RunCount in the project
after the tests have been run: -->
<Output TaskParameter="RunCount" PropertyName="RunCount" />
</Gallio>
<!-- After execution the number of tests run can be retrieved like this: -->
<Message Text="$(RunCount) tests were run." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.SkippedCount">
<summary>
Gets the total number of test cases that did not run because they were skipped.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's SkippedCount output property will
be made available as a property called SkippedCount in the project
after the tests have been run: -->
<Output TaskParameter="SkippedCount" PropertyName="SkippedCount" />
</Gallio>
<!-- After execution the number of skipped tests can be retrieved like this: -->
<Message Text="$(SkippedCount) tests were skipped." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.Duration">
<summary>
Gets the duration of the tests execution in seconds.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's Duration output property will
be made available as a property called Duration in the project
after the tests have been run: -->
<Output TaskParameter="Duration" PropertyName="Duration" />
</Gallio>
<!-- After execution the duration can be retrieved like this: -->
<Message Text="The tests took $(Duration)s to execute." />
]]>
</code>
</example>
</member>
<member name="P:Gallio.MSBuildTasks.Gallio.AssertCount">
<summary>
Gets the number of assertions evaluated.
</summary>
<example>
To use this property, you need to include an Output tag within the
Gallio tag to specify a name to reference it:
<code>
<![CDATA[
<Gallio>
<!-- This tells MSBuild that the task's AssertionCount output property will
be made available as a property called AssertionCount in the project
after the tests have been run: -->
<Output TaskParameter="AssertionCount" PropertyName="AssertionCount" />
</Gallio>
<!-- After execution the number of assertions can be retrieved like this: -->
<Message Text="$(AssertionCount) assertions were evaluated." />
]]>
</code>
</example>
</member>
<member name="T:Gallio.MSBuildTasks.NamespaceDoc">
<summary>
The Gallio.MSBuildTasks namespace contains MSBuild tasks for Gallio.
</summary>
</member>
<member name="T:Gallio.MSBuildTasks.TaskLogger">
<exclude/>
<summary>
Logs messages to a <see cref="T:Microsoft.Build.Utilities.TaskLoggingHelper"/> instance.
</summary>
</member>
<member name="T:Gallio.MSBuildTasks.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Properties.Resources.DefaultReportNameFormat">
<summary>
Looks up a localized string similar to test-report-{0}-{1}.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Properties.Resources.TaskNameAndVersion">
<summary>
Looks up a localized string similar to Gallio MSBuild Task - Version {0}.
</summary>
</member>
<member name="P:Gallio.MSBuildTasks.Properties.Resources.UnexpectedErrorDuringExecution">
<summary>
Looks up a localized string similar to An unexpected error occurred during execution of the Gallio task..
</summary>
</member>
<member name="T:Gallio.MSBuildTasks.TaskLogExtension">
<exclude/>
<summary>
Logs messages to a <see cref="T:Microsoft.Build.Utilities.TaskLoggingHelper"/> instance
for test results.
</summary>
</member>
</members>
</doc>

BIN
lib/Gallio_3.2.517.0/Gallio.NAntTasks.dll

Binary file not shown.

20
lib/Gallio_3.2.517.0/Gallio.NAntTasks.plugin

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.NAntTasks"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio NAnt Tasks</name>
<version>3.2.0.0</version>
<description>Provides NAnt tasks for running tests with Gallio.</description>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="Gallio.NAntTasks.plugin" />
<file path="Gallio.NAntTasks.dll" />
<file path="Gallio.NAntTasks.xml" />
</files>
</plugin>

684
lib/Gallio_3.2.517.0/Gallio.NAntTasks.xml

@ -0,0 +1,684 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Gallio.NAntTasks</name>
</assembly>
<members>
<member name="T:Gallio.NAntTasks.GallioTask">
<summary>
A NAnt task that provides support for running Gallio tests.
</summary>
<remarks>
<para>
In order for NAnt to find this task, either the Gallio.NAntTasks.dll assembly needs
to be put in NAnt's bin folder, or it must be loaded with the loadtasks directive:
<code><![CDATA[
<loadtasks assembly="[pathtoassembly]\Gallio.NAntTasks.dll" />
]]></code>
</para>
</remarks>
<example>
The following code is an example build file that shows how to load the task, specify the test files
and assemblies and set some of the task's properties:
<code><![CDATA[
<?xml version="1.0" ?>
<project name="TestProject" default="RunTests">
<!-- This is needed by NAnt to locate the Gallio task -->
<loadtasks assembly="[pathtoassembly]\Gallio.NAntTasks.dll" />
<target name="RunTests">
<gallio result-property="ExitCode" failonerror="false" filter="Type=SomeFixture" >
<files>
<!-- Specify the tests files and assemblies -->
<include name="[Path-to-test-assembly1]/TestAssembly1.dll" />
<include name="[Path-to-test-assembly2]/TestAssembly2.dll" />
<include name="[Path-to-test-script1]/TestScript1_spec.rb" />
<include name="[Path-to-test-script2]/TestScript2.xml" />
</files>
</gallio>
<fail if="${ExitCode != '0'}" >The return code should have been 0!</fail>
</target>
</project>
]]></code>
</example>
</member>
<member name="M:Gallio.NAntTasks.GallioTask.#ctor">
<summary>
Default constructor.
</summary>
</member>
<member name="M:Gallio.NAntTasks.GallioTask.ExecuteTask">
<summary>
Executes the task.
</summary>
</member>
<member name="M:Gallio.NAntTasks.GallioTask.RunLauncher(Gallio.Runner.TestLauncher)">
<exclude />
<summary>
Provided so that the unit tests can override test execution behavior.
</summary>
</member>
<member name="M:Gallio.NAntTasks.GallioTask.SetResultProperty(System.IConvertible)">
<summary>
Checks the result code of the tests execution and performs the
corresponding action.
</summary>
<param name="resultCode">The result code returned by the Run method of the
TestRunnerHelper class.</param>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.Files">
<summary>
The list of test files, projects and assemblies to execute.
</summary>
<remarks>
<para>
Wildcards may be used.
</para>
<para>
This is required.
</para>
</remarks>
<example>
The following example shows how to specify the test files, projects and assemblies
(for a more complete example please see the <see cref="T:Gallio.NAntTasks.GallioTask"/> task documentation):
<code><![CDATA[
<gallio>
<files>
<!-- Specify the tests files, projects and assemblies -->
<include name="[Path-to-test-assembly1]/TestAssembly1.dll" />
<include name="[Path-to-test-assembly2]/TestAssembly2.dll" />
<include name="[Path-to-test-script1]/TestScript1_spec.rb" />
<include name="[Path-to-test-script2]/TestScript2.xml" />
</files>
</gallio>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.HintDirectories">
<summary>
The list of directories used for loading referenced assemblies and other dependent resources.
</summary>
<example>
The following example shows how to specify the hint directories:
<code><![CDATA[
<gallio>
<hint-directories>
<include name="C:\SomeFolder\AnotherFolder" />
<include name="../somefolder" />
</hint-directories>
</gallio>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.PluginDirectories">
<summary>
Additional Gallio plugin directories to search recursively.
</summary>
<example>
The following example shows how to specify the plugins directories:
<code><![CDATA[
<gallio>
<plugin-directories>
<include name="C:\SomeFolder\AnotherFolder" />
<include name="../somefolder" />
</plugin-directories>
</gallio>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ApplicationBaseDirectory">
<summary>
Gets or sets the relative or absolute path of the application base directory,
or null to use a default value selected by the consumer.
</summary>
<remarks>
<para>
If relative, the path is based on the current working directory,
so a value of "" causes the current working directory to be used.
</para>
<para>
The default is null.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.WorkingDirectory">
<summary>
Gets or sets the relative or absolute path of the working directory
or null to use a default value selected by the consumer.
</summary>
<remarks>
<para>
If relative, the path is based on the current working directory,
so a value of "" causes the current working directory to be used.
</para>
<para>
The default is null.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ShadowCopy">
<summary>
Enables shadow copying when set to true.
</summary>
<remarks>
<para>
Shadow copying allows the original assemblies to be modified while the tests are running.
However, shadow copying may occasionally cause some tests to fail if they depend on their original location.
</para>
<para>
The default is false.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.Debug">
<summary>
Attaches the debugger to the test process when set to true.
</summary>
<remarks>
<para>
The default is false.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.RuntimeVersion">
<summary>
Gets or sets the version of the .Net runtime to use for running tests.
</summary>
<remarks>
<para>
For the CLR, this must be the name of one of the framework directories in %SystemRoot%\Microsoft.Net\Framework. eg. 'v2.0.50727'.
</para>
<para>
The default is null which uses the most recent installed and supported framework.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ReportTypes">
<summary>
A list of the types of reports to generate, separated by semicolons.
</summary>
<remarks>
<list type="bullet">
<item>The types supported "out of the box" are: Html, Html-Inline, Text, XHtml,
XHtml-Inline, Xml, and Xml-Inline, but more types could be available as plugins.</item>
<item>The report types are not case sensitives.</item>
</list>
</remarks>
<example>
In the following example reports will be generated in both HTML and XML format.
<code><![CDATA[
<gallio report-types="html;xml">
<!-- More options -->
</gallio>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ReportArchive">
<summary>
Sets the report archive mode.
</summary>
<remarks>
<para>
The supported modes are:
<list type="bullet">
<item>Normal (default)</item>
<item>Zip</item>
</list>
</para>
</remarks>
<example>
In the following example, reports will be enclosed in a zip file:
<code>
<![CDATA[
<gallio report-archive="zip">
<!-- More options -->
</gallio>
]]>
</code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ReportNameFormat">
<summary>
Sets the format string to use to generate the reports filenames.
</summary>
<remarks>
<para>
Any occurence of {0} will be replaced by the date, and any occurrence of {1} by the time.
The default format string is test-report-{0}-{1}.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ReportDirectory">
<summary>
Sets the name of the directory where the reports will be put.
</summary>
<remarks>
<para>
The directory will be created if it doesn't exist. Existing files will be overwritten.
The default report directory is "Reports".
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ShowReports">
<summary>
Sets whether to show generated reports in a window using the default system application
registered to the report file type.
</summary>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.RunnerType">
<summary>
Sets the type of test runner to use.
</summary>
<remarks>
<list type="bullet">
<item>The types supported "out of the box" are: Local, IsolatedAppDomain
and IsolatedProcess (default), but more types could be available as plugins.</item>
<item>The runner types are not case sensitive.</item>
</list>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.RunnerExtensions">
<summary>
Specifies the type, assembly, and parameters of custom test runner
extensions to use during the test run.
</summary>
<remarks>
<para>
The value must be in the form '[Namespace.]Type,Assembly[;Parameters]'.
</para>
<para>
eg. 'FancyLogger,MyCustomExtensions.dll;SomeParameters'
</para>
</remarks>
<example>
The following example runs tests using a custom logger extension:
<code><![CDATA[
<gallio>
<runner-extension value="FancyLogger,MyExtensions.dll;ColorOutput,FancyIndenting" />
<!-- More options -->
</gallio>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.RunnerProperties">
<summary>
Specifies option property key/value pairs for the test runner.
</summary>
<example>
The following example specifies some extra NCover arguments.
<code><![CDATA[
<gallio>
<runner-property value="NCoverArguments='//eas Gallio'" />
<!-- More options -->
</gallio>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ReportFormatterProperties">
<summary>
Specifies option property key/value pairs for the report formatter.
</summary>
<example>
The following example changes the default attachment content disposition for the reports.
<code><![CDATA[
<gallio>
<report-formatter-property value="AttachmentContentDisposition=Absent" />
<!-- More options -->
</gallio>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.DoNotRun">
<summary>
Sets whether to load the tests but not run them.
</summary>
<remarks>
<para>
This option may be used to produce a
report that contains test metadata for consumption by other tools.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.IgnoreAnnotations">
<summary>
Sets whether to ignore annotations when determining the result code.
</summary>
<remarks>
<para>
If false (default), then error annotations, usually indicative of broken tests, will cause
a failure result to be generated.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.EchoResults">
<summary>
Sets whether to echo results to the screen as tests finish.
</summary>
<remarks>
<para>
If this option is set to true, the default, test results are echoed to the console
in varying detail depending on the current verbosity level. Otherwise
only the final summary statistics are displayed.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.RunTimeLimit">
<summary>
Sets the maximum amount of time (in seconds) the tests can run
before they are canceled.
</summary>
<remarks>
<para>
The default is an infinite time to run.
</para>
</remarks>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.ResultProperty">
<summary>
Sets the name of a NAnt property in which the exit code of the tests execution
should be stored.
</summary>
<remarks>
<para>
Only of interest if FailOnError is set to false.
</para>
</remarks>
<example>
<code><![CDATA[
<target name="RunTests">
<gallio result-property="ExitCode" failonerror="false">
<!-- Include test assemblies -->
</gallio>
<fail if="${ExitCode != 0}" >The return code should have been 0!</fail>
</target>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.StatisticsPropertiesPrefix">
<summary>
Sets the prefix that will be used for the statistics result properties.
</summary>
<remarks>
<para>
The following properties are available:
<list type="bullet">
<item><term>AssertCount</term><description>Gets the number of assertions evaluated.</description></item>
<item><term>FailedCount</term><description>Gets the total number of test cases that were run and failed.</description></item>
<item><term>InconclusiveCount</term><description>Gets the total number of test cases that ran and were inconclusive.</description></item>
<item><term>PassedCount</term><description>Gets the total number of test cases that were run and passed.</description></item>
<item><term>SkippedCount</term><description>Gets the total number of test cases that did not run because they were skipped.</description></item>
<item><term>RunCount</term><description>Gets the total number of test cases that were run.</description></item>
<item><term>TestCount</term><description>Gets the total number of test cases.</description></item>
<item><term>StepCount</term><description>Gets the total number of test steps.</description></item>
</list>
</para>
</remarks>
<example>
The following example shows how to use the result-properties-prefix property:
<code><![CDATA[
<target name="RunTests">
<gallio statistics-properties-prefix="gallio.">
<files>
<include name="SomeAssembly.dll" />
</files>
</gallio>
<echo message="AssertCount = ${gallio.AssertCount}" />
<echo message="FailedCount = ${gallio.FailedCount}" />
<echo message="InconclusiveCount = ${gallio.InconclusiveCount}" />
<echo message="PassedCount = ${gallio.PassedCount}" />
<echo message="SkippedCount = ${gallio.SkippedCount}" />
<echo message="RunCount = ${gallio.RunCount}" />
<echo message="TestCount = ${gallio.TestCount}" />
<echo message="StepCount = ${gallio.StepCount}" />
</target>
]]></code>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.Filter">
<summary>
<para>
Sets the filter set to apply, which consists of a sequence of one or more inclusion
or exclusion filter rules prefixed using 'include' (optional) or 'exclude'.
</para>
</summary>
<remarks>
<para>
A filter rule consists of zero or more filter expressions
that may be combined using 'and', 'or', and 'not' and grouped with
parentheses. A filter expression consists of a filter key followed by one or
more comma-delimited matching values in the form 'key: value, "quoted value",
/regular expression/'.
</para><para>
The filter grammar is defined as follows:
</para><para>
<code><![CDATA[
INCLUDE ::= "include" # Not case-sensitive
EXCLUDE ::= "exclude" # Not case-sensitive
OR ::= "or" # Not case-sensitive
AND ::= "and" # Not case-sensitive
NOT ::= "not" # Not case-sensitive
<unquotedWord> ::= [^:,*()/\"']+
<quotedWord> ::= '"' .* '"' # String delimited by double quotation marks
| "'" .* "'" # String delimited by single quotation marks
<word> ::= <unquotedWord>
| <quotedWord>
<regexWord> ::= "/" .* "/" # Regular expression
| "/" .* "/i" # Case-insensitive regular expression
<key> ::= <word>
<value> ::= <word> # Value specified by exact string
| <regexWord> # Value specified by regular expression
<matchSequence> ::= <value> (',' <value>)* # One or more comma-separated values
<filterExpr> ::= "*" # "Any"
| <key> ":" matchSeq>
| <filterExpr> OR filterExpr> # Combine filter expressions with OR
| <filterExpr> AND filterExpr> # Combine filter expressions with AND
| NOT <filterExpr> # Negate filter expression
| "(" <filterExpr> ")" # Grouping filter expression
<filterRule> ::= <filterExpr> # Inclusion rule (default case)
| INCLUDE <filterExpr> # Inclusion rule
| EXCLUDE <filterExpr> # Exclusion rule
<filterSet> ::= <filterRule> # Filter set consists of at least one filter rule.
| <filterRule> <filterSet> # But may be a sequence of rules.
]]></code>
</para><list type="bullet">
<item>By default this property takes the value "*", which means the "Any" filter will be applied.</item>
<item>
The operator precedence is, from highest to lowest: NOT, AND, and OR. All these operators are
left-associative.
</item>
<item>
The commas used to separate the values are interpreted as OR operators, so "Type:Fixture1,Fixture2"
is equivalent to "Type:Fixture1 or Type:Fixture2".
</item>
<item>
White-space is ignored outside quoted strings, so "Type:Fixture1|Type:Fixture2" is equivalent
to "Type : Fixture1 | Type : Fixture2".
</item>
<item>
Commas, colons, slashes, backslashes and quotation marks can be escaped with a backslash. For
example, \' will be interpreted as '. Using a single backslash in front of any other character
is invalid.
</item>
<item>
Currently the following filter keys are recognized:
<list type="bullet">
<item>Id: Filter by id.</item>
<item>Name: Filter by name.</item>
<item>Assembly: Filter by assembly name.</item>
<item>Namespace: Filter by namespace name.</item>
<item>Type: Filter by type name, including inherited types.</item>
<item>ExactType: Filter by type name, excluding inherited types.</item>
<item>Member: Filter by member name.</item>
<item>
*: All other names are assumed to correspond to metadata keys. See <see cref="T:Gallio.Model.MetadataKeys"/> for standard metadata keys. Common keys are: AuthorName, Category, Description, Importance, TestsOn. <seealso cref="T:Gallio.Model.MetadataKeys"/>
</item>
</list>
</item>
</list>
</remarks>
<example>
<para>
Assuming the following fixtures have been defined:
</para><code><![CDATA[
[TestFixture]
[Category("UnitTest")]
[Author("AlbertEinstein")]
public class Fixture1
{
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
}
[TestFixture]
[Category("IntegrationTest")]
public class Fixture2
{
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
}
]]></code><para>The following filters could be applied:</para><list type="bullet">
<item>
<term>Type: Fixture1</term>
<description>All the tests within Fixture1 will be run.</description>
</item>
<item>
<term>Member: Test1</term>
<description>Only Fixture1.Test1 and Fixture2.Test1 will be run.</description>
</item>
<item>
<term>Type: Fixture1, Fixture2</term>
<description>All the tests within Fixture1 or Fixture2 will be run.</description>
</item>
<item>
<term>Type:Fixture1 or Type:Fixture2</term>
<description>All the tests within Fixture1 or Fixture2 will be run.</description>
</item>
<item>
<term>Type:Fixture1, Fixture2 and Member:Test2</term>
<description>Only Fixture1.Test2 and Fixture2.Test2 will be run.</description>
</item>
<item>
<term>Type:/Fixture*/ and Member:Test2</term>
<description>Only Fixture1.Test2 and Fixture2.Test2 will be run.</description>
</item>
<item>
<term>AuthorName:AlbertEinstein</term>
<description>All the tests within Fixture1 will be run because its author attribute is set to "AlbertEinstein".</description>
</item>
<item>
<term>Category: IntegrationTest</term>
<description>All the tests within Fixture2 will be run because its category attribute is set to "IntegrationTest".</description>
</item>
<item>
<term>("Type": 'Fixture1' and "Member":/Test*/) or (Type : Fixture2 and Member: /Test*/)</term>
<description>All the tests will be run. This example also shows that you can enclose key and
values with quotation marks, and group expressions with parentheses.</description>
</item>
<item>
<term>exclude AuthorName: AlbertEinstein</term>
<description>All the tests within Fixture2 will be run because its author attribute is not set to "AlbertEinstein".</description>
</item>
<item>
<term>exclude Type: Fixture2 include Member: Test2</term>
<description>Only Fixture1.Test2 will be run because Fixture2 was excluded from consideration before the inclusion rule was applied.</description>
</item>
</list>
</example>
</member>
<member name="P:Gallio.NAntTasks.GallioTask.Verbosity">
<summary>
Controls the level of information logged.
</summary>
<remarks>
<para>
The default is "Normal".
</para>
</remarks>
<example>
<code><![CDATA[
<target name="RunTests">
<gallio verbosity="Quiet" failonerror="false">
<!-- Include test files -->
</gallio>
<fail if="${ExitCode != 0}" >The return code should have been 0!</fail>
</target>
]]></code>
</example>
</member>
<member name="T:Gallio.NAntTasks.NamespaceDoc">
<summary>
The Gallio.NAntTasks namespace contains NAnt tasks for Gallio.
</summary>
</member>
<member name="T:Gallio.NAntTasks.TaskLogger">
<exclude/>
<summary>
An <see cref="T:Gallio.Runtime.Logging.ILogger"/> implementation that logs messages to a <see cref="T:NAnt.Core.Task"/> object.
</summary>
</member>
<member name="T:Gallio.NAntTasks.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:Gallio.NAntTasks.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:Gallio.NAntTasks.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:Gallio.NAntTasks.Properties.Resources.DefaultReportNameFormat">
<summary>
Looks up a localized string similar to test-report-{0}-{1}.
</summary>
</member>
<member name="P:Gallio.NAntTasks.Properties.Resources.TaskNameAndVersion">
<summary>
Looks up a localized string similar to Gallio NAnt Task - Version {0}.
</summary>
</member>
<member name="P:Gallio.NAntTasks.Properties.Resources.TestExecutionFailed">
<summary>
Looks up a localized string similar to Test Execution Failed.
</summary>
</member>
</members>
</doc>

24
lib/Gallio_3.2.517.0/Gallio.Navigator.Readme.txt

@ -0,0 +1,24 @@
Gallio.Navigator
================
The Gallio Navigator component enables external applications to navigate to source code
by clicking on links that are interpreted by a Pluggable Protocol Handler or by loading
an ActiveX / COM object marked safe for scripting.
These services are intended to present a minimum security risk and specifically do not
disclose user information to the calling application.
(In the future this mechanism may be used to provide additional Gallio services.)
NavigateTo Service:
Link Format: gallio:navigateTo?path=<path>&line=<lineNumber>&column=<columnNumber>
ActiveX: Gallio.Navigator.GallioNavigator class
bool NavigateTo(string path, int lineNumber, int columnNumber)
Parameters:
<path> - The path of the source file.
<lineNumber> - The 1-based line number, or 0 if unspecified.
<columnNumber> - The 1-based column number, or 0 if unspecified.

BIN
lib/Gallio_3.2.517.0/Gallio.Navigator.exe

Binary file not shown.

7
lib/Gallio_3.2.517.0/Gallio.Navigator.exe.config

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>

22
lib/Gallio_3.2.517.0/Gallio.Navigator.plugin

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.Navigator"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Navigator</name>
<version>3.2.0.0</version>
<description>.</description>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
<dependency pluginId="Gallio.VisualStudio.Interop" />
</dependencies>
<files>
<file path="Gallio.Navigator.plugin" />
<file path="Gallio.Navigator.exe" />
<file path="Gallio.Navigator.exe.config" />
<file path="Gallio.Navigator.Readme.txt" />
</files>
</plugin>

BIN
lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.dll

Binary file not shown.

404
lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.dll-Help.xml

@ -0,0 +1,404 @@
<?xml version="1.0" encoding="utf-8" ?>
<helpItems xmlns="http://msh" schema="maml">
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
Run-Gallio
</command:name>
<maml:description>
<maml:para>Runs tests using Gallio.</maml:para>
</maml:description>
<maml:copyright>
<maml:para>Copyright © 2005-2009 Gallio Project - http://www.gallio.org/</maml:para>
</maml:copyright>
<command:verb>Run</command:verb>
<command:noun>Gallio</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>The Run-Gallio cmdlet runs tests using Gallio.</maml:para>
</maml:description>
<command:syntax>
<!--
Description of the properties used in the command:parameter elements:
# Required
* If true, the parameter must appear in all commands that use the parameter set.
* If false, the parameter is optional in all commands that use the parameter set.
# Position
* If named, the parameter name is required.
* If positional, the parameter name is optional. When it is omitted, the parameter value must be in the specified position in the command. For example, if the value is position="1", the parameter value must be the first or only unnamed parameter value in the command.
# Pipeline Input
* If true (ByValue), you can pipe input to the parameter. The input is associated with ("bound to") the parameter even if the property name and the object type do not match the expected type. The Microsoft® Windows® PowerShell parameter binding components try to convert the input to the correct type and fail the command only when the type cannot be converted. Only one parameter in a parameter set can be associated by value.
* If true (ByPropertyName), you can pipe input to the parameter. However, the input is associated with the parameter only when the parameter name matches the name of a property of the input object. For example, if the parameter name is Path, objects piped to the cmdlet are associated with that parameter only when the object has a property named path.
* If true (ByValue, ByPropertyName), you can pipe input to the parameter either by property name or by value. Only one parameter in a parameter set can be associated by value.
* If false, you cannot pipe input to this parameter.
# Globbing
* If true, the text that the user types for the parameter value can include wildcard characters.
* If false, the text that the user types for the parameter value cannot include wildcard characters.
# VariableLength
* It looks this property is meaningless, at least in PowerShell 1.0:
============================================================================
Hi Keith
This attribute is not consumed by our Help formatter in the current release.
This is added to comply with MAML command schema.
Thanks
Krishna[MSFT]
Windows PowerShell Team
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
============================================================================
-->
<command:syntaxItem>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ApplicationBaseDirectory</maml:name>
<maml:description>
<maml:para>The relative or absolute path of the application base directory to use during test execution instead of the default.</maml:para>
</maml:description>
<dev:defaultValue>String.Empty</dev:defaultValue>
</command:parameter>
<maml:name>Run-Gallio</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1">
<maml:name>Files</maml:name>
<maml:description>
<maml:para>The list of comma-separated, relative or absolute paths of test files, projects and assemblies to execute. Wildcards may be used.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>DoNotRun</maml:name>
<maml:description>
<maml:para>Sets whether to load the tests but not run them. This option may be used to produce a report that contains test metadata for consumption by other tools.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>Filter</maml:name>
<maml:description>
<maml:para>
Sets the filter set to apply, which consists of a sequence of one or more inclusion
or exclusion filter rules prefixed using 'include' (optional) or 'exclude'.
A filter rule consists of zero or more filter expressions
that may be combined using 'and', 'or', and 'not' and grouped with
parentheses. A filter expression consists of a filter key followed by one or
more comma-delimited matching values in the form 'key: value, "quoted value",
/regular expression/'.
</maml:para>
</maml:description>
<dev:defaultValue>*</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>HintDirectories</maml:name>
<maml:description>
<maml:para>The list of directories used for loading referenced assemblies and other dependent resources.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>NoEchoResults</maml:name>
<maml:description>
<maml:para>Sets whether to echo results to the screen as tests finish. If this option is specified only the final summary statistics are displayed. Otherwise test results are echoed to the console in varying detail depending on the current verbosity level.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>NoProgress</maml:name>
<maml:description>
<maml:para>Sets whether progress information is shown during the execution. If this option is specified, the execution is silent and no progress information is displayed.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>PluginDirectories</maml:name>
<maml:description>
<maml:para>Additional Gallio plugin directories to search recursively.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportDirectory</maml:name>
<maml:description>
<maml:para>Sets the name of the directory where the reports will be put.</maml:para>
</maml:description>
<dev:defaultValue>"Reports"</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportNameFormat</maml:name>
<maml:description>
<maml:para>Sets the format string to use to generate the reports filenames.</maml:para>
</maml:description>
<dev:defaultValue>test-report-{0}-{1}</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportArchive</maml:name>
<maml:description>
<maml:para>Indicates whether to enclose the resulting test report in a compressed archive file.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportTypes</maml:name>
<maml:description>
<maml:para>A list of the types of reports to generate, separated by semicolons.</maml:para>
</maml:description>
<dev:defaultValue>String.Empty</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>RunnerType</maml:name>
<maml:description>
<maml:para>Sets the type of test runner to use (LocalAppDomain, IsolatedAppDomain or IsolatedProcess, but more could be available as plugins).</maml:para>
</maml:description>
<dev:defaultValue>IsolatedProcess</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ShadowCopy</maml:name>
<maml:description>
<maml:para>
Enables shadow copying when set to true. Shadow copying allows the original assemblies to be modified while the tests are running. However, shadow copying may occasionally cause some tests to fail if they depend on their original location.
</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>DebugTests</maml:name>
<maml:description>
<maml:para>
Attaches the debugger to the test process.
</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ShowReports</maml:name>
<maml:description>
<maml:para>Sets whether to open the generated reports once execution has finished.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>WorkingDirectory</maml:name>
<maml:description>
<maml:para>
The relative or absolute path of the working directory to use during test execution instead of the default.
</maml:para>
</maml:description>
<dev:defaultValue>String.Empty</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>RuntimeVersion</maml:name>
<maml:description>
<maml:para>The version of the .Net runtime to use for running tests. For the CLR, this must be the name of one of the framework directories in %SystemRoot%\Microsoft.Net\Framework. eg. 'v2.0.50727'. The default is null which uses the most recent installed and supported framework.</maml:para>
</maml:description>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<!-- This section is a copy paste of the syntax parameter. The only difference between both sections
is that here the parameters can appear only once, whereas in the syntax section they can appear in
different parameter sets. -->
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ApplicationBaseDirectory</maml:name>
<maml:description>
<maml:para>The relative or absolute path of the application base directory.</maml:para>
</maml:description>
<dev:defaultValue>String.Empty</dev:defaultValue>
</command:parameter>
<maml:name>Run-Gallio</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1">
<maml:name>Files</maml:name>
<maml:description>
<maml:para>The list of comma-separated, relative or absolute paths of test files, projects and assemblies to execute. Wildcards may be used.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>DoNotRun</maml:name>
<maml:description>
<maml:para>Sets whether to load the tests but not run them. This option may be used to produce a report that contains test metadata for consumption by other tools.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>Filter</maml:name>
<maml:description>
<maml:para>
Sets the filter set to apply, which consists of a sequence of one or more inclusion
or exclusion filter rules prefixed using 'include' (optional) or 'exclude'.
A filter rule consists of zero or more filter expressions
that may be combined using 'and', 'or', and 'not' and grouped with
parentheses. A filter expression consists of a filter key followed by one or
more comma-delimited matching values in the form 'key: value, "quoted value",
/regular expression/'.
</maml:para>
</maml:description>
<dev:defaultValue>*</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>HintDirectories</maml:name>
<maml:description>
<maml:para>The list of directories used for loading referenced assemblies and other dependent resources.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>NoEchoResults</maml:name>
<maml:description>
<maml:para>Sets whether to echo results to the screen as tests finish. If this option is specified only the final summary statistics are displayed. Otherwise test results are echoed to the console in varying detail depending on the current verbosity level.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>NoProgress</maml:name>
<maml:description>
<maml:para>Sets whether progress information is shown during the execution. If this option is specified, the execution is silent and no progress information is displayed.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>PluginDirectories</maml:name>
<maml:description>
<maml:para>Additional Gallio plugin directories to search recursively.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportDirectory</maml:name>
<maml:description>
<maml:para>Sets the name of the directory where the reports will be put.</maml:para>
</maml:description>
<dev:defaultValue>"Reports"</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportNameFormat</maml:name>
<maml:description>
<maml:para>Sets the format string to use to generate the reports filenames.</maml:para>
</maml:description>
<dev:defaultValue>test-report-{0}-{1}</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportArchive</maml:name>
<maml:description>
<maml:para>Indicates whether to enclose the resulting test report in a compressed archive file.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ReportTypes</maml:name>
<maml:description>
<maml:para>A list of the types of reports to generate, separated by semicolons.</maml:para>
</maml:description>
<dev:defaultValue>String.Empty</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>RunnerType</maml:name>
<maml:description>
<maml:para>Sets the type of test runner to use: Local, IsolatedAppDomain, IsolatedProcess, or others that may be provided by plugins.</maml:para>
</maml:description>
<dev:defaultValue>IsolatedProcess</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>RunnerExtensions</maml:name>
<maml:description>
<maml:para>Specifies the type, assembly, and parameters of custom test runner extensions to use during the test run in the form: '[Namespace.]Type,Assembly[;Parameters]. eg. 'FancyLogger,MyExtensions.dll;ColorOutput,FancyIndenting'</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ShadowCopy</maml:name>
<maml:description>
<maml:para>
Enables shadow copying when set to true. Shadow copying allows the original assemblies to be modified while the tests are running. However, shadow copying may occasionally cause some tests to fail if they depend on their original location.
</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>DebugTests</maml:name>
<maml:description>
<maml:para>
Attaches the debugger to the test process.
</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>ShowReports</maml:name>
<maml:description>
<maml:para>Sets whether to open the generated reports once execution has finished.</maml:para>
</maml:description>
<dev:defaultValue>false</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>WorkingDirectory</maml:name>
<maml:description>
<maml:para>
The relative or absolute path of the working directory. If relative, the path is based on the current working directory, so a value of "" (an empty string) causes the current working directory to be used.
</maml:para>
</maml:description>
<dev:defaultValue>String.Empty</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>RuntimeVersion</maml:name>
<maml:description>
<maml:para>The version of the .Net runtime to use for running tests. For the CLR, this must be the name of one of the framework directories in %SystemRoot%\Microsoft.Net\Framework. eg. 'v2.0.50727'. The default is null which uses the most recent installed and supported framework.</maml:para>
</maml:description>
</command:parameter>
</command:parameters>
<command:examples>
<command:example>
# Makes the Gallio commands available
Add-PSSnapIn Gallio
# Runs TestAssembly1.dll
Run-Gallio "[Path-to-assembly1]\TestAssembly1.dll","[Path-to-assembly2]\TestAssembly2.dll","[Path-to-test-script1]/TestScript1_spec.rb","[Path-to-test-script2]/TestScript2.xml" -f Category:UnitTests -rd C:\build\reports -rf html -ra
</command:example>
</command:examples>
</command:command>
</helpItems>

21
lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.plugin

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.PowerShellCommands"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio PowerShell Commands</name>
<version>3.2.0.0</version>
<description>Provides PowerShell cmdlets for running tests with Gallio.</description>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="Gallio.PowerShellCommands.plugin" />
<file path="Gallio.PowerShellCommands.dll" />
<file path="Gallio.PowerShellCommands.dll-Help.xml" />
<file path="Gallio.PowerShellCommands.xml" />
</files>
</plugin>

660
lib/Gallio_3.2.517.0/Gallio.PowerShellCommands.xml

@ -0,0 +1,660 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Gallio.PowerShellCommands</name>
</assembly>
<members>
<member name="T:Gallio.PowerShellCommands.BaseCommand">
<exclude />
<summary>
Abstract base class for PowerShell commands.
Provides some useful runtime support.
</summary>
</member>
<member name="M:Gallio.PowerShellCommands.BaseCommand.PostMessage(Gallio.Common.Action)">
<summary>
Posts an action to perform later within the message loop.
</summary>
<param name="action">The action to perform.</param>
<seealso cref="M:Gallio.PowerShellCommands.BaseCommand.RunWithMessagePump(Gallio.Common.Action)"/>
</member>
<member name="M:Gallio.PowerShellCommands.BaseCommand.RunWithMessagePump(Gallio.Common.Action)">
<summary>
Starts a message pump running on the current thread and performs the
specified action in another thread. The action can asynchronously communicate back to the
cmdlet using <see cref="M:Gallio.PowerShellCommands.BaseCommand.PostMessage(Gallio.Common.Action)"/> on the current thread.
</summary>
<param name="action">The action to perform.</param>
</member>
<member name="M:Gallio.PowerShellCommands.BaseCommand.StopProcessing">
<summary>
Aborts the processing of the command.
</summary>
</member>
<member name="E:Gallio.PowerShellCommands.BaseCommand.StopRequested">
<summary>
The event dispatches when the command is asynchronously being stopped
via <see cref="M:Gallio.PowerShellCommands.BaseCommand.StopProcessing"/>.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.BaseCommand.Logger">
<summary>
Gets the logger for the cmdlet.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.BaseCommand.NoProgress">
<summary>
Sets whether progress information is shown during the execution. If this option is specified,
the execution is silent and no progress information is displayed.
</summary>
<remarks>
<list type="bullet">
<item>This parameter takes the value true if present and false if not. No
value has to be specified.</item>
</list>
</remarks>
<example>
<code>
# Shows progress information
Run-Gallio SomeAssembly.dll
# Hides progress information
Run-Gallio SomeAssembly.dll -np
</code>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.BaseCommand.ProgressMonitorProvider">
<summary>
Gets the progress monitor provider for the cmdlet.
</summary>
</member>
<member name="T:Gallio.PowerShellCommands.CommandProgressMonitorPresenter">
<exclude />
</member>
<member name="T:Gallio.PowerShellCommands.CommandProgressMonitorProvider">
<exclude />
</member>
<member name="T:Gallio.PowerShellCommands.NamespaceDoc">
<summary>
The Gallio.PowerShellCommands namespace contains Powershell cmdlets for Gallio.
</summary>
</member>
<member name="T:Gallio.PowerShellCommands.RunGallioCommand">
<summary>
A PowerShell Cmdlet for running Gallio.
</summary>
<remarks>
Only the <see cref="P:Gallio.PowerShellCommands.RunGallioCommand.Files"/> parameter is required.
</remarks>
<example>
<para>There are severals ways to run this cmdlet:</para>
<code><![CDATA[
# Makes the Gallio commands available
Add-PSSnapIn Gallio
# Runs a few assemblies and scripts.
Run-Gallio "[Path-to-assembly1]\TestAssembly1.dll","[Path-to-assembly2]\TestAssembly2.dll","[Path-to-test-script1]/TestScript1_spec.rb","[Path-to-test-script2]/TestScript2.xml" -f Category:UnitTests -rd C:\build\reports -rf html -ra zip
]]></code>
</example>
</member>
<member name="M:Gallio.PowerShellCommands.RunGallioCommand.#ctor">
<summary>
Default constructor.
</summary>
</member>
<member name="M:Gallio.PowerShellCommands.RunGallioCommand.EndProcessing">
<exclude />
</member>
<member name="M:Gallio.PowerShellCommands.RunGallioCommand.RunLauncher(Gallio.Runner.TestLauncher)">
<exclude />
<summary>
Provided so that the unit tests can override test execution behavior.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.Files">
<summary>
The list of relative or absolute paths of test files, projects and assemblies to execute.
Wildcards may be used. This is required.
</summary>
<example>
<para>There are severals ways to pass the test files to the cmdlet:</para>
<code><![CDATA[
# Runs TestAssembly1.dll
Run-Gallio "[Path-to-assembly1]\TestAssembly1.dll"
# Runs TestAssembly1.dll and TestAssembly2.dll
Run-Gallio "[Path-to-assembly1]\TestAssembly1.dll","[Path-to-assembly2]\TestAssembly2.dll"
# Runs TestAssembly1.dll and TestAssembly2.dll
$assemblies = "[Path-to-assembly1]\TestAssembly1.dll","[Path-to-assembly2]\TestAssembly2.dll"
Run-Gallio $assemblies
# Runs TestAssembly1.dll, TestAssembly2.dll, TestScript1_spec.rb, and TestScript2.xml
$assembly1 = "[Path-to-assembly1]\TestAssembly1.dll"
$assembly2 = "[Path-to-assembly2]\TestAssembly2.dll"
$script1 = "[Path-to-test-script1]\TestScript1_spec.rb"
$script2 = "[Path-to-test-script2]/TestScript2.xml"
$files = $assembly1,$assembly2,$script1,$script2
Run-Gallio $files
# If you don't specify the test files, PowerShell will prompt you for the names:
PS C:\Documents and Settings\jhi> Run-Gallio
cmdlet Run-Gallio at command pipeline position
Supply values for the following parameters:
Files[0]:
]]></code>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.HintDirectories">
<summary>
The list of directories used for loading referenced assemblies and other dependent resources.
</summary>
<example>
<para>The following example shows how to specify the hint directories:</para>
<code><![CDATA[
Run-Gallio SomeAssembly.dll -hd C:\SomeFolder
]]></code>
<para>See the <see cref="P:Gallio.PowerShellCommands.RunGallioCommand.Files"/> property for more ways of passing list of parameters to the cmdlet.</para>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.PluginDirectories">
<summary>
Additional Gallio plugin directories to search recursively.
</summary>
<example>
<para>The following example shows how to specify the plugin directories:</para>
<code><![CDATA[
Run-Gallio SomeAssembly.dll -pd C:\SomeFolder
]]></code>
<para>See the <see cref="P:Gallio.PowerShellCommands.RunGallioCommand.Files"/> property for more ways of passing list of parameters to
the cmdlet.</para>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ApplicationBaseDirectory">
<summary>
Gets or sets the relative or absolute path of the application base directory,
or null to use a default value selected by the consumer.
</summary>
<remarks>
<para>
If relative, the path is based on the current working directory,
so a value of "" causes the current working directory to be used.
</para>
<para>
The default is null.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.WorkingDirectory">
<summary>
Gets or sets the relative or absolute path of the working directory
or null to use a default value selected by the consumer.
</summary>
<remarks>
<para>
If relative, the path is based on the current working directory,
so a value of "" causes the current working directory to be used.
</para>
<para>
The default is null.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ShadowCopy">
<summary>
Enables shadow copying when set to true.
</summary>
<remarks>
<para>
Shadow copying allows the original assemblies to be modified while the tests are running.
However, shadow copying may occasionally cause some tests to fail if they depend on their original location.
</para>
<para>
The default is false.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.DebugTests">
<summary>
Attaches the debugger to the test process when set to true.
</summary>
<remarks>
<para>
The default is false.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.RuntimeVersion">
<summary>
Gets or sets the version of the .Net runtime to use for running tests.
</summary>
<remarks>
<para>
For the CLR, this must be the name of one of the framework directories in <c>%SystemRoot%\Microsoft.Net\Framework.</c> eg. 'v2.0.50727'.
</para>
<para>
The default is null which uses the most recent installed and supported framework.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ReportTypes">
<summary>
A list of the types of reports to generate, separated by semicolons.
</summary>
<remarks>
<list type="bullet">
<item>The types supported "out of the box" are: Html, Html-Inline, Text, XHtml,
XHtml-Inline, Xml, and Xml-Inline, but more types could be available as plugins.</item>
<item>The report types are not case sensitives.</item>
</list>
</remarks>
<example>
<para>In the following example reports will be generated in both HTML and XML format:</para>
<code><![CDATA[
Run-Gallio SomeAssembly.dll -rt "html","text"
]]></code>
<para>See the <see cref="P:Gallio.PowerShellCommands.RunGallioCommand.Files"/> property for more ways of passing list of parameters to
the cmdlet.</para>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ReportNameFormat">
<summary>
Sets the format string to use to generate the reports filenames.
</summary>
<remarks>
<para>
Any occurence of {0} will be replaced by the date, and any occurrence of {1} by the time.
</para>
<para>
The default format string is <c>test-report-{0}-{1}</c>.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ReportDirectory">
<summary>
Sets the name of the directory where the reports will be put.
</summary>
<remarks>
<para>
The directory will be created if it doesn't exist. Existing files will be overwritten.
The default report directory is "Reports".
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ReportArchive">
<summary>
Specifies to enclose the resulting reports into a compressed archive file (zip).
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.Filter">
<summary>
<para>
Sets the filter set to apply, which consists of a sequence of one or more inclusion
or exclusion filter rules prefixed using 'include' (optional) or 'exclude'.
</para>
</summary>
<remarks>
<para>
A filter rule consists of zero or more filter expressions
that may be combined using 'and', 'or', and 'not' and grouped with
parentheses. A filter expression consists of a filter key followed by one or
more comma-delimited matching values in the form 'key: value, "quoted value",
/regular expression/'.
</para><para>
The filter grammar is defined as follows:
</para><para>
<code><![CDATA[
INCLUDE ::= "include" # Not case-sensitive
EXCLUDE ::= "exclude" # Not case-sensitive
OR ::= "or" # Not case-sensitive
AND ::= "and" # Not case-sensitive
NOT ::= "not" # Not case-sensitive
<unquotedWord> ::= [^:,*()/\"']+
<quotedWord> ::= '"' .* '"' # String delimited by double quotation marks
| "'" .* "'" # String delimited by single quotation marks
<word> ::= <unquotedWord>
| <quotedWord>
<regexWord> ::= "/" .* "/" # Regular expression
| "/" .* "/i" # Case-insensitive regular expression
<key> ::= <word>
<value> ::= <word> # Value specified by exact string
| <regexWord> # Value specified by regular expression
<matchSequence> ::= <value> (',' <value>)* # One or more comma-separated values
<filterExpr> ::= "*" # "Any"
| <key> ":" matchSeq>
| <filterExpr> OR filterExpr> # Combine filter expressions with OR
| <filterExpr> AND filterExpr> # Combine filter expressions with AND
| NOT <filterExpr> # Negate filter expression
| "(" <filterExpr> ")" # Grouping filter expression
<filterRule> ::= <filterExpr> # Inclusion rule (default case)
| INCLUDE <filterExpr> # Inclusion rule
| EXCLUDE <filterExpr> # Exclusion rule
<filterSet> ::= <filterRule> # Filter set consists of at least one filter rule.
| <filterRule> <filterSet> # But may be a sequence of rules.
]]></code>
</para><list type="bullet">
<item>By default this property takes the value "*", which means the "Any" filter will be applied.</item>
<item>
The operator precedence is, from highest to lowest: NOT, AND, and OR. All these operators are
left-associative.
</item>
<item>
The commas used to separate the values are interpreted as OR operators, so "Type:Fixture1,Fixture2"
is equivalent to "Type:Fixture1 or Type:Fixture2".
</item>
<item>
White-space is ignored outside quoted strings, so "Type:Fixture1|Type:Fixture2" is equivalent
to "Type : Fixture1 | Type : Fixture2".
</item>
<item>
Commas, colons, slashes, backslashes and quotation marks can be escaped with a backslash. For
example, \' will be interpreted as '. Using a single backslash in front of any other character
is invalid.
</item>
<item>
Currently the following filter keys are recognized:
<list type="bullet">
<item>Id: Filter by id.</item>
<item>Name: Filter by name.</item>
<item>Assembly: Filter by assembly name.</item>
<item>Namespace: Filter by namespace name.</item>
<item>Type: Filter by type name, including inherited types.</item>
<item>ExactType: Filter by type name, excluding inherited types.</item>
<item>Member: Filter by member name.</item>
<item>
*: All other names are assumed to correspond to metadata keys. See <see cref="T:Gallio.Model.MetadataKeys"/> for standard metadata keys. Common keys are: AuthorName, Category, Description, Importance, TestsOn. <seealso cref="T:Gallio.Model.MetadataKeys"/>
</item>
</list>
</item>
</list>
</remarks>
<example>
<para>
Assuming the following fixtures have been defined:
</para><code><![CDATA[
[TestFixture]
[Category("UnitTest")]
[Author("AlbertEinstein")]
public class Fixture1
{
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
}
[TestFixture]
[Category("IntegrationTest")]
public class Fixture2
{
[Test]
public void Test1()
{
}
[Test]
public void Test2()
{
}
}
]]></code><para>The following filters could be applied:</para><list type="bullet">
<item>
<term>Type: Fixture1</term>
<description>All the tests within Fixture1 will be run.</description>
</item>
<item>
<term>Member: Test1</term>
<description>Only Fixture1.Test1 and Fixture2.Test1 will be run.</description>
</item>
<item>
<term>Type: Fixture1, Fixture2</term>
<description>All the tests within Fixture1 or Fixture2 will be run.</description>
</item>
<item>
<term>Type:Fixture1 or Type:Fixture2</term>
<description>All the tests within Fixture1 or Fixture2 will be run.</description>
</item>
<item>
<term>Type:Fixture1, Fixture2 and Member:Test2</term>
<description>Only Fixture1.Test2 and Fixture2.Test2 will be run.</description>
</item>
<item>
<term>Type:/Fixture*/ and Member:Test2</term>
<description>Only Fixture1.Test2 and Fixture2.Test2 will be run.</description>
</item>
<item>
<term>AuthorName:AlbertEinstein</term>
<description>All the tests within Fixture1 will be run because its author attribute is set to "AlbertEinstein".</description>
</item>
<item>
<term>Category: IntegrationTest</term>
<description>All the tests within Fixture2 will be run because its category attribute is set to "IntegrationTest".</description>
</item>
<item>
<term>("Type": 'Fixture1' and "Member":/Test*/) or (Type : Fixture2 and Member: /Test*/)</term>
<description>All the tests will be run. This example also shows that you can enclose key and
values with quotation marks, and group expressions with parentheses.</description>
</item>
<item>
<term>exclude AuthorName: AlbertEinstein</term>
<description>All the tests within Fixture2 will be run because its author attribute is not set to "AlbertEinstein".</description>
</item>
<item>
<term>exclude Type: Fixture2 include Member: Test2</term>
<description>Only Fixture1.Test2 will be run because Fixture2 was excluded from consideration before the inclusion rule was applied.</description>
</item>
</list>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ShowReports">
<summary>
Sets whether to open the generated reports once execution has finished.
</summary>
<remarks>
<list type="bullet">
<item>This parameter takes the value true if present and false if not. No
value has to be specified.</item>
<item>
The reports are opened in a window using the default system application
registered to the report file type.
</item>
</list>
</remarks>
<example>
<code><![CDATA[
# Doesn't show the reports once execution has finished
Run-Gallio SomeAssembly.dll
# Shows the reports once execution has finished
Run-Gallio SomeAssembly.dll -sr
]]></code>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.RunnerType">
<summary>
Sets the type of test runner to use.
</summary>
<remarks>
<list type="bullet">
<item>The types supported "out of the box" are: <c>Local</c>, <c>IsolatedAppDomain</c>
and <c>IsolatedProcess</c> (default), but more types could be available as plugins.</item>
<item>The runner types are not case sensitive.</item>
</list>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.RunnerExtensions">
<summary>
Specifies the type, assembly, and parameters of custom test runner
extensions to use during the test run.
</summary>
<remarks>
<para>
The value must be in the form <c>'[Namespace.]Type,Assembly[;Parameters]'</c> .
</para>
</remarks>
<example>
The following example runs tests using a custom logger extension:
<code><![CDATA[
Run-Gallio SomeAssembly.dll -runner-extension 'FancyLogger,MyExtensions.dll;ColorOutput,FancyIndenting'
]]></code>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.RunnerProperties">
<summary>
Specifies option property key/value pairs for the test runner.
</summary>
<example>
The following example specifies some extra NCover arguments.
<code><![CDATA[
Run-Gallio SomeAssembly.dll -runner-property "NCoverArguments='//eas Gallio'"
]]></code>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.ReportFormatterProperties">
<summary>
Specifies option property key/value pairs for the report formatter.
</summary>
<example>
The following example changes the default attachment content disposition for the reports.
<code><![CDATA[
Run-Gallio SomeAssembly.dll -report-formatter-property "AttachmentContentDisposition=Absent"
]]></code>
</example>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.DoNotRun">
<summary>
Sets whether to load the tests but not run them.
</summary>
<remarks>
<para>
This option may be used to produce a report that contains test metadata for consumption by other tools.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.IgnoreAnnotations">
<summary>
Sets whether to ignore annotations when determining the result code.
</summary>
<remarks>
<para>
If false (default), then error annotations, usually indicative of broken tests, will cause
a failure result to be generated.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.NoEchoResults">
<summary>
Sets whether to echo results to the screen as tests finish.
</summary>
<remarks>
<para>
If this option is specified only the final summary statistics are displayed. Otherwise test results are echoed to the
console in varying detail depending on the current verbosity level.
</para>
</remarks>
</member>
<member name="P:Gallio.PowerShellCommands.RunGallioCommand.RunTimeLimit">
<summary>
Sets the maximum amount of time (in seconds) the tests can run
before they are canceled. The default is an infinite time to run.
</summary>
</member>
<member name="T:Gallio.PowerShellCommands.GallioSnapIn">
<exclude />
<summary>
A PowerShell SnapIn that registers the Gallio Cmdlets.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.GallioSnapIn.Description">
<summary>
Gets the description of the snap-in.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.GallioSnapIn.Name">
<summary>
Gets the name of the snap-in.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.GallioSnapIn.Vendor">
<summary>
Gets the vendor of the snap-in.
</summary>
</member>
<member name="T:Gallio.PowerShellCommands.CommandLogger">
<exclude/>
<summary>
Logs messages using a <see cref="T:Gallio.PowerShellCommands.BaseCommand"/>'s logging functions.
</summary>
</member>
<member name="M:Gallio.PowerShellCommands.CommandLogger.#ctor(Gallio.PowerShellCommands.BaseCommand)">
<summary>
Initializes a new instance of the <see cref="T:Gallio.PowerShellCommands.CommandLogger"/> class.
</summary>
<param name="cmdlet">The <see cref="T:System.Management.Automation.Cmdlet"/> instance to channel
log messages to.</param>
</member>
<member name="M:Gallio.PowerShellCommands.CommandLogger.LogImpl(Gallio.Runtime.Logging.LogSeverity,System.String,Gallio.Common.Diagnostics.ExceptionData)">
<summary>
Logs a message.
</summary>
<param name="severity">The log message severity.</param>
<param name="message">The message to log.</param>
<param name="exceptionData">The exception to log (it can be null).</param>
</member>
<member name="T:Gallio.PowerShellCommands.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.Properties.Resources.CmdletNameAndVersion">
<summary>
Looks up a localized string similar to Gallio PowerShell Cmdlet - Version {0}.{1} build {2}.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.Properties.Resources.DefaultReportNameFormat">
<summary>
Looks up a localized string similar to test-report-{0}-{1}.
</summary>
</member>
<member name="P:Gallio.PowerShellCommands.Properties.Resources.UnexpectedErrorDuringExecution">
<summary>
Looks up a localized string similar to An unexpected error occurred during execution of the Gallio task..
</summary>
</member>
</members>
</doc>

BIN
lib/Gallio_3.2.517.0/Gallio.Reports.dll

Binary file not shown.

241
lib/Gallio_3.2.517.0/Gallio.Reports.plugin

@ -0,0 +1,241 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.Reports"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Reports Library</name>
<version>3.2.0.0</version>
<description>Provides several common report formats including Xml, Html, XHtml, MHtml and Text.</description>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="Gallio.Reports.plugin" />
<file path="Gallio.Reports.dll" />
<file path="Gallio.Reports.xml" />
<file path="Resources\css\Gallio-Report.css" />
<file path="Resources\img\Failed.gif" />
<file path="Resources\img\FullStop.gif" />
<file path="Resources\img\GallioTestReportHeader.png" />
<file path="Resources\img\header-background.gif" />
<file path="Resources\img\Ignored.gif" />
<file path="Resources\img\Minus.gif" />
<file path="Resources\img\Passed.gif" />
<file path="Resources\img\Plus.gif" />
<file path="Resources\img\UnknownTestKind.png" />
<file path="Resources\js\Gallio-Report.js" />
<file path="Resources\js\expressInstall.swf" />
<file path="Resources\js\player.swf" />
<file path="Resources\js\swfobject.js" />
<file path="Resources\xsl\Gallio-Report.ccnet-details-condensed.xsl" />
<file path="Resources\xsl\Gallio-Report.ccnet-details.xsl" />
<file path="Resources\xsl\Gallio-Report.common.xsl" />
<file path="Resources\xsl\Gallio-Report.html-condensed.xsl" />
<file path="Resources\xsl\Gallio-Report.html.xsl" />
<file path="Resources\xsl\Gallio-Report.html+xhtml.xsl" />
<file path="Resources\xsl\Gallio-Report.txt.xsl" />
<file path="Resources\xsl\Gallio-Report.txt-common.xsl" />
<file path="Resources\xsl\Gallio-Report.txt-condensed.xsl" />
<file path="Resources\xsl\Gallio-Report.xhtml-condensed.xsl" />
<file path="Resources\xsl\Gallio-Report.xhtml.xsl" />
</files>
<assemblies>
<assembly fullName="Gallio.Reports, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="Gallio.Reports.dll"
qualifyPartialName="true" />
</assemblies>
<components>
<component componentId="ReportFormatter.Xml"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XmlReportFormatter, Gallio.Reports">
<parameters>
<defaultAttachmentContentDisposition>Link</defaultAttachmentContentDisposition>
</parameters>
<traits>
<name>Xml</name>
<description>
Generates XML reports with linked attachment files.
Supported report formatter properties:
- AttachmentContentDisposition: Specifies how attachments should be stored. "Absent", "Link" or "Inline". Default is "Link".
</description>
</traits>
</component>
<component componentId="ReportFormatter.Xml-Inline"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XmlReportFormatter, Gallio.Reports">
<parameters>
<defaultAttachmentContentDisposition>Inline</defaultAttachmentContentDisposition>
</parameters>
<traits>
<name>Xml-Inline</name>
<description>Generates XML reports with inline encoded attachments.</description>
</traits>
</component>
<component componentId="ReportFormatter.Text"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XsltReportFormatter, Gallio.Reports">
<parameters>
<extension>txt</extension>
<contentType>text/plain</contentType>
<defaultAttachmentContentDisposition>Absent</defaultAttachmentContentDisposition>
<resourceDirectory>plugin://Gallio.Reports/Resources/</resourceDirectory>
<xsltPath>xsl/Gallio-Report.txt.xsl</xsltPath>
<resourcePaths></resourcePaths>
</parameters>
<traits>
<name>Text</name>
<description>Generates plain text reports.</description>
</traits>
</component>
<component componentId="ReportFormatter.Text-Condensed"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XsltReportFormatter, Gallio.Reports">
<parameters>
<extension>txt</extension>
<contentType>text/plain</contentType>
<defaultAttachmentContentDisposition>Absent</defaultAttachmentContentDisposition>
<resourceDirectory>plugin://Gallio.Reports/Resources/</resourceDirectory>
<xsltPath>xsl/Gallio-Report.txt-condensed.xsl</xsltPath>
<resourcePaths></resourcePaths>
</parameters>
<traits>
<name>Text-Condensed</name>
<description>Generates plain text reports without passing tests.</description>
</traits>
</component>
<component componentId="ReportFormatter.Html"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XsltReportFormatter, Gallio.Reports">
<parameters>
<extension>html</extension>
<contentType>text/html</contentType>
<defaultAttachmentContentDisposition>Link</defaultAttachmentContentDisposition>
<resourceDirectory>plugin://Gallio.Reports/Resources/</resourceDirectory>
<xsltPath>xsl/Gallio-Report.html.xsl</xsltPath>
<resourcePaths>css;js;img</resourcePaths>
</parameters>
<traits>
<name>Html</name>
<description>
Generates HTML reports.
Supported report formatter properties:
- AttachmentContentDisposition: Specifies how attachments should be stored. "Absent", "Link" or "Inline". Default is "Link".
</description>
</traits>
</component>
<component componentId="ReportFormatter.Html-Condensed"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XsltReportFormatter, Gallio.Reports">
<parameters>
<extension>html</extension>
<contentType>text/html</contentType>
<defaultAttachmentContentDisposition>Link</defaultAttachmentContentDisposition>
<resourceDirectory>plugin://Gallio.Reports/Resources/</resourceDirectory>
<xsltPath>xsl/Gallio-Report.html-condensed.xsl</xsltPath>
<resourcePaths>css;js;img</resourcePaths>
</parameters>
<traits>
<name>Html-Condensed</name>
<description>
Generates HTML reports that omit passing tests.
Supported report formatter properties:
- AttachmentContentDisposition: Specifies how attachments should be stored. "Absent", "Link" or "Inline". Default is "Link".
</description>
</traits>
</component>
<component componentId="ReportFormatter.XHtml"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XsltReportFormatter, Gallio.Reports">
<parameters>
<extension>xhtml</extension>
<contentType>text/xhtml+xml</contentType>
<defaultAttachmentContentDisposition>Link</defaultAttachmentContentDisposition>
<resourceDirectory>plugin://Gallio.Reports/Resources/</resourceDirectory>
<xsltPath>xsl/Gallio-Report.xhtml.xsl</xsltPath>
<resourcePaths>css;js;img</resourcePaths>
</parameters>
<traits>
<name>XHtml</name>
<description>
Generates XHTML reports.
Supported report formatter properties:
- AttachmentContentDisposition: Specifies how attachments should be stored. "Absent", "Link" or "Inline". Default is "Link".
</description>
</traits>
</component>
<component componentId="ReportFormatter.XHtml-Condensed"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.XsltReportFormatter, Gallio.Reports">
<parameters>
<extension>xhtml</extension>
<contentType>text/xhtml+xml</contentType>
<defaultAttachmentContentDisposition>Link</defaultAttachmentContentDisposition>
<resourceDirectory>plugin://Gallio.Reports/Resources/</resourceDirectory>
<xsltPath>xsl/Gallio-Report.xhtml-condensed.xsl</xsltPath>
<resourcePaths>css;js;img</resourcePaths>
</parameters>
<traits>
<name>XHtml-Condensed</name>
<description>
Generates XHTML reports that omit passing tests.
Supported report formatter properties:
- AttachmentContentDisposition: Specifies how attachments should be stored. "Absent", "Link" or "Inline". Default is "Link".
</description>
</traits>
</component>
<component componentId="ReportFormatter.MHtml"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.MHtmlReportFormatter, Gallio.Reports">
<parameters>
<htmlReportFormatter>${ReportFormatter.Html}</htmlReportFormatter>
</parameters>
<traits>
<name>MHtml</name>
<description>Generates MHTML reports.</description>
</traits>
</component>
<component componentId="ReportFormatter.MHtml-Condensed"
serviceId="Gallio.ReportFormatter"
componentType="Gallio.Reports.MHtmlReportFormatter, Gallio.Reports">
<parameters>
<htmlReportFormatter>${ReportFormatter.Html-Condensed}</htmlReportFormatter>
</parameters>
<traits>
<name>MHtml-Condensed</name>
<description>Generates MHTML reports that omit passing tests.</description>
</traits>
</component>
<component componentId="Gallio.Reports.Installer"
serviceId="Gallio.Installer"
componentType="Gallio.Reports.ReportResourcesInstaller, Gallio.Reports">
<parameters>
<testKindImageDir>plugin://Gallio.Reports/Resources/img/testkinds/</testKindImageDir>
<generatedCssFile>plugin://Gallio.Reports/Resources/css/Gallio-Report.Generated.css</generatedCssFile>
</parameters>
<traits>
<requiresElevation>true</requiresElevation>
</traits>
</component>
</components>
</plugin>

229
lib/Gallio_3.2.517.0/Gallio.Reports.xml

@ -0,0 +1,229 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Gallio.Reports</name>
</assembly>
<members>
<member name="T:Gallio.Reports.BaseReportFormatter">
<summary>
Abstract base class for report formatters.
</summary>
</member>
<member name="F:Gallio.Reports.BaseReportFormatter.AttachmentContentDispositionOption">
<summary>
Gets the name of the option that how attachments are saved.
</summary>
</member>
<member name="M:Gallio.Reports.BaseReportFormatter.#ctor">
<summary>
Creates a report formatter.
</summary>
</member>
<member name="M:Gallio.Reports.BaseReportFormatter.GetAttachmentContentDisposition(Gallio.Runner.Reports.ReportFormatterOptions)">
<summary>
Gets the attachment content disposition.
</summary>
<param name="options">The formatter options.</param>
<returns>The attachment content disposition.</returns>
</member>
<member name="M:Gallio.Reports.BaseReportFormatter.Format(Gallio.Runner.Reports.IReportWriter,Gallio.Runner.Reports.ReportFormatterOptions,Gallio.Runtime.ProgressMonitoring.IProgressMonitor)">
<inheritdoc />
</member>
<member name="P:Gallio.Reports.BaseReportFormatter.DefaultAttachmentContentDisposition">
<summary>
Gets or sets the default attachment content disposition.
Defaults to <see cref="F:Gallio.Common.Markup.AttachmentContentDisposition.Absent"/>.
</summary>
</member>
<member name="T:Gallio.Reports.MHtmlReportFormatter">
<summary>
<para>
Formats MIME HTML archive reports similar to the web archives generated by Internet Explorer.
The report can then be sent to recipients as a single file.
</para>
<para>
Unfortunately the format is non-standard and cannot be read by most other browsers.
</para>
</summary>
</member>
<member name="M:Gallio.Reports.MHtmlReportFormatter.#ctor(Gallio.Runner.Reports.IReportFormatter)">
<summary>
Creates a report formatter.
</summary>
<param name="htmlReportFormatter">The HTML report formatter.</param>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="htmlReportFormatter"/> is null.</exception>
</member>
<member name="M:Gallio.Reports.MHtmlReportFormatter.Format(Gallio.Runner.Reports.IReportWriter,Gallio.Runner.Reports.ReportFormatterOptions,Gallio.Runtime.ProgressMonitoring.IProgressMonitor)">
<inheritdoc />
</member>
<member name="T:Gallio.Reports.MultipartMimeReportContainer">
<summary>
A report container that saves a report as a multipart mime archive in a single file
within another container.
</summary>
<remarks>
This is currently specialized for saving HTML reports.
It does not support loading reports.
</remarks>
</member>
<member name="M:Gallio.Reports.MultipartMimeReportContainer.#ctor(Gallio.Runner.Reports.IReportContainer)">
<summary>
Creates the multipart mime report container.
</summary>
<param name="inner">The container to which the archived report should be saved.</param>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="inner"/> is null.</exception>
</member>
<member name="M:Gallio.Reports.MultipartMimeReportContainer.OpenArchive(System.String)">
<summary>
Opens the archive within the inner container.
</summary>
<param name="archivePath">The path of the archive to create.</param>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="archivePath"/> is null.</exception>
<exception cref="T:System.InvalidOperationException">Thrown if the archive has already been opened.</exception>
</member>
<member name="M:Gallio.Reports.MultipartMimeReportContainer.CloseArchive">
<summary>
Finishes writing out the MIME archive and closes it.
Does nothing if the archive is not open.
</summary>
</member>
<member name="P:Gallio.Reports.MultipartMimeReportContainer.ReportName">
<inheritdoc />
</member>
<member name="T:Gallio.Reports.NamespaceDoc">
<summary>
The Gallio.Reports namespace provides report formatters for common Gallio test report types.
</summary>
</member>
<member name="T:Gallio.Reports.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:Gallio.Reports.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:Gallio.Reports.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="T:Gallio.Reports.ReportResourcesInstaller">
<summary>
Installs derived resources for reports such as test framework icons.
</summary>
</member>
<member name="M:Gallio.Reports.ReportResourcesInstaller.#ctor(Gallio.Model.ITestKindManager,System.IO.DirectoryInfo,System.IO.FileInfo)">
<summary>
Initializes the installer.
</summary>
<param name="testKindManager">The test kind manager, not null.</param>
<param name="testKindImageDir">The test kind image directory, not null.</param>
<param name="generatedCssFile">The generated CSS file, not null.</param>
</member>
<member name="M:Gallio.Reports.ReportResourcesInstaller.Install(Gallio.Runtime.ProgressMonitoring.IProgressMonitor)">
<inheritdoc />
</member>
<member name="T:Gallio.Reports.XmlReportFormatter">
<summary>
Formats reports as Xml.
</summary>
<remarks>
<para>
Recognizes the following options:
<list type="bullet">
<listheader>
<term>Option</term>
<description>Description</description>
</listheader>
<item>
<term>AttachmentContentDisposition</term>
<description>Overrides the default attachment content disposition for the format.
The content disposition may be "Absent" to exclude attachments, "Link" to
include attachments by reference to external files, or "Inline" to include attachments as
inline content within the formatted document. Different formats use different
default content dispositions.</description>
</item>
</list>
</para>
</remarks>
</member>
<member name="M:Gallio.Reports.XmlReportFormatter.#ctor">
<summary>
Creates an Xml report formatter.
</summary>
</member>
<member name="M:Gallio.Reports.XmlReportFormatter.Format(Gallio.Runner.Reports.IReportWriter,Gallio.Runner.Reports.ReportFormatterOptions,Gallio.Runtime.ProgressMonitoring.IProgressMonitor)">
<inheritdoc />
</member>
<member name="T:Gallio.Reports.XsltReportFormatter">
<summary>
<para>
Generic XSLT report formatter.
</para>
<para>
Recognizes the following options:
<list type="bullet">
<listheader>
<term>Option</term>
<description>Description</description>
</listheader>
<item>
<term>AttachmentContentDisposition</term>
<description>Overrides the default attachment content disposition for the format.
The content disposition may be "Absent" to exclude attachments, "Link" to
include attachments by reference to external files, or "Inline" to include attachments as
inline content within the formatted document. Different formats use different
default content dispositions.</description>
</item>
</list>
</para>
</summary>
</member>
<member name="M:Gallio.Reports.XsltReportFormatter.#ctor(System.String,System.String,System.IO.DirectoryInfo,System.String,System.String[])">
<summary>
Creates an XSLT report formatter.
</summary>
<param name="extension">The preferred extension without a '.'</param>
<param name="contentType">The content type of the main report document.</param>
<param name="resourceDirectory">The resource directory.</param>
<param name="xsltPath">The path of the XSLT relative to the resource directory.</param>
<param name="resourcePaths">The paths of the resources (such as images or CSS) to copy
to the report directory relative to the resource directory.</param>
<exception cref="T:System.ArgumentNullException">Thrown if any arguments are null.</exception>
</member>
<member name="M:Gallio.Reports.XsltReportFormatter.Format(Gallio.Runner.Reports.IReportWriter,Gallio.Runner.Reports.ReportFormatterOptions,Gallio.Runtime.ProgressMonitoring.IProgressMonitor)">
<inheritdoc />
</member>
<member name="M:Gallio.Reports.XsltReportFormatter.ApplyTransform(Gallio.Runner.Reports.IReportWriter,Gallio.Common.Markup.AttachmentContentDisposition,Gallio.Runner.Reports.ReportFormatterOptions)">
<summary>
Applies the transform to produce a report.
</summary>
</member>
<member name="M:Gallio.Reports.XsltReportFormatter.CopyResources(Gallio.Runner.Reports.IReportWriter)">
<summary>
Copies additional resources to the content path within the report.
</summary>
</member>
<member name="M:Gallio.Reports.XsltReportFormatter.PopulateArguments(System.Xml.Xsl.XsltArgumentList,Gallio.Runner.Reports.ReportFormatterOptions,System.String)">
<summary>
Populates the arguments for the XSL template processing.
</summary>
</member>
<member name="M:Gallio.Reports.XsltReportFormatter.LoadTransform(System.String)">
<summary>
Loads the XSL transform.
</summary>
<param name="resolvedXsltPath">The full path of the XSLT.</param>
<returns>The transform.</returns>
</member>
<member name="P:Gallio.Reports.XsltReportFormatter.Transform">
<summary>
Gets the XSL transform.
</summary>
</member>
</members>
</doc>

BIN
lib/Gallio_3.2.517.0/Gallio.UI.dll

Binary file not shown.

127
lib/Gallio_3.2.517.0/Gallio.UI.plugin

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.UI"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio UI Library</name>
<version>3.2.0.0</version>
<description>Gallio UI components.</description>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="Gallio.UI.plugin" />
<file path="Gallio.UI.dll" />
<file path="Gallio.UI.xml" />
<file path="Aga.Controls.dll" />
<file path="WeifenLuo.WinFormsUI.Docking.dll" />
<file path="Gallio.Common.Splash.dll" />
<file path="Gallio.Common.Splash.xml" />
</files>
<assemblies>
<assembly fullName="Gallio.UI, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="Gallio.UI.dll"
qualifyPartialName="true" />
</assemblies>
<services>
<service serviceId="Gallio.UI.ControlPanelPresenter"
serviceType="Gallio.UI.ControlPanel.IControlPanelPresenter, Gallio.UI" />
<service serviceId="Gallio.UI.ControlPanelTabProvider"
serviceType="Gallio.UI.ControlPanel.IControlPanelTabProvider, Gallio.UI" />
<service serviceId="Gallio.UI.PreferencePaneProvider"
serviceType="Gallio.UI.ControlPanel.Preferences.IPreferencePaneProvider, Gallio.UI"
defaultComponentType="Gallio.UI.ControlPanel.Preferences.PlaceholderPreferencePaneProvider, Gallio.UI"/>
<service serviceId="Gallio.UI.EventAggregator"
serviceType="Gallio.UI.Events.IEventAggregator, Gallio.UI" />
<service serviceId="Gallio.UI.TaskManager"
serviceType="Gallio.UI.ProgressMonitoring.ITaskManager, Gallio.UI" />
<service serviceId="Gallio.UI.TaskQueue"
serviceType="Gallio.UI.ProgressMonitoring.ITaskQueue, Gallio.UI" />
<service serviceId="Gallio.UI.TaskRunner"
serviceType="Gallio.UI.ProgressMonitoring.ITaskRunner, Gallio.UI" />
<service serviceId="Gallio.UI.UnhandledExceptionPolicy"
serviceType="Gallio.UI.Common.Policies.IUnhandledExceptionPolicy, Gallio.UI" />
</services>
<components>
<component componentId="Gallio.UI.ControlPanelPresenter"
serviceId="Gallio.UI.ControlPanelPresenter"
componentType="Gallio.UI.ControlPanel.ControlPanelPresenter, Gallio.UI" />
<component componentId="Gallio.UI.PreferenceControlPanelTabProvider"
serviceId="Gallio.UI.ControlPanelTabProvider"
componentType="Gallio.UI.ControlPanel.Preferences.PreferenceControlPanelTabProvider, Gallio.UI">
<traits>
<name>Preferences</name>
<order>0</order>
</traits>
</component>
<component componentId="Gallio.UI.PluginControlPanelTabProvider"
serviceId="Gallio.UI.ControlPanelTabProvider"
componentType="Gallio.UI.ControlPanel.Plugins.PluginControlPanelTabProvider, Gallio.UI">
<traits>
<name>Plugins</name>
<order>100</order>
</traits>
</component>
<component componentId="Gallio.UI.PlaceholderPreferencePaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider">
<traits>
<path>Gallio</path>
<order>-100</order>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
</traits>
</component>
<component componentId="Gallio.UI.RuntimePreferencePaneProvider"
serviceId="Gallio.UI.PreferencePaneProvider"
componentType="Gallio.UI.ControlPanel.Preferences.RuntimePreferencePaneProvider, Gallio.UI">
<traits>
<path>Gallio/Runtime</path>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
<scope>Machine</scope>
</traits>
</component>
<component componentId="Gallio.UI.RuntimePreferencePaneCommitterElevatedCommand"
serviceId="Gallio.ElevatedCommand"
componentType="Gallio.UI.ControlPanel.Preferences.RuntimePreferencePaneCommitterElevatedCommand, Gallio.UI" />
<component componentId="Gallio.UI.EventAggregator"
serviceId="Gallio.UI.EventAggregator"
componentType="Gallio.UI.Events.EventAggregator, Gallio.UI" />
<component componentId="Gallio.UI.TaskManager"
serviceId="Gallio.UI.TaskManager"
componentType="Gallio.UI.ProgressMonitoring.TaskManager, Gallio.UI" />
<component componentId="Gallio.UI.TaskQueue"
serviceId="Gallio.UI.TaskQueue"
componentType="Gallio.UI.ProgressMonitoring.TaskQueue, Gallio.UI" />
<component componentId="Gallio.UI.TaskRunner"
serviceId="Gallio.UI.TaskRunner"
componentType="Gallio.UI.ProgressMonitoring.TaskRunner, Gallio.UI" />
<component componentId="Gallio.UI.UnhandledExceptionPolicy"
serviceId="Gallio.UI.UnhandledExceptionPolicy"
componentType="Gallio.UI.Common.Policies.UnhandledExceptionPolicy, Gallio.UI" />
</components>
</plugin>

1356
lib/Gallio_3.2.517.0/Gallio.UI.xml

File diff suppressed because it is too large

BIN
lib/Gallio_3.2.517.0/Gallio.Utility.exe

Binary file not shown.

26
lib/Gallio_3.2.517.0/Gallio.Utility.exe.config

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="gallio" type="Gallio.Runtime.GallioSectionHandler, Gallio" />
</configSections>
<runtime>
<legacyUnhandledExceptionPolicy enabled="1" />
<!-- Enable loading assemblies over the network in .Net 4.0 -->
<loadFromRemoteSources enabled="true" />
</runtime>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
<system.diagnostics>
<assert assertuienabled="false" />
</system.diagnostics>
<startup>
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>

18
lib/Gallio_3.2.517.0/Gallio.Utility.plugin

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.Utility"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Utility</name>
<version>3.2.0.0</version>
<description>A command-line utility for performing maintenance tasks related to the Gallio installation.</description>
<icon>plugin://Gallio.Utility/Resources/Gallio.Utility.ico</icon>
</traits>
<files>
<file path="Gallio.Utility.plugin" />
<file path="Gallio.Utility.exe" />
<file path="Gallio.Utility.exe.config" />
<file path="Resources\Gallio.Utility.ico" />
</files>
</plugin>

BIN
lib/Gallio_3.2.517.0/Gallio.VisualStudio.Interop.dll

Binary file not shown.

28
lib/Gallio_3.2.517.0/Gallio.VisualStudio.Interop.plugin

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio.VisualStudio.Interop"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Visual Studio Interoperability Plugin</name>
<version>3.2.0.0</version>
<description>Provides support for opening files in Visual Studio and launching the debugger.</description>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="Gallio.VisualStudio.Interop.plugin" />
<file path="Gallio.VisualStudio.Interop.dll" />
</files>
<assemblies>
<assembly fullName="Gallio.VisualStudio.Interop, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="Gallio.VisualStudio.Interop.dll"
qualifyPartialName="true" />
</assemblies>
<components>
</components>
</plugin>

BIN
lib/Gallio_3.2.517.0/Gallio.XmlSerializers.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/Gallio.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/Gallio.pdb

Binary file not shown.

654
lib/Gallio_3.2.517.0/Gallio.plugin

@ -0,0 +1,654 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio</name>
<version>3.2.0.0</version>
<description>The heart of Gallio.</description>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
</traits>
<dependencies>
<dependency pluginId="BuiltIn" />
</dependencies>
<files>
<file path="Gallio.plugin" />
<file path="Gallio.dll" />
<file path="Gallio.pdb" />
<file path="Gallio.xml" />
<file path="Gallio.XmlSerializers.dll" />
<file path="Gallio.Host.exe" />
<file path="Gallio.Host.exe.config" />
<file path="Gallio.Host.x86.exe" />
<file path="Gallio.Host.x86.exe.config" />
<file path="Gallio.Host.Elevated.exe" />
<file path="Gallio.Host.Elevated.exe.config" />
<file path="Gallio.Host.Elevated.x86.exe" />
<file path="Gallio.Host.Elevated.x86.exe.config" />
<file path="Resources\Assembly.ico" />
<file path="Resources\Container.ico" />
<file path="Resources\Fixture.ico" />
<file path="Resources\Gallio.ico" />
<file path="Resources\Test.ico" />
<file path="Resources\Unsupported.ico" />
</files>
<assemblies>
<assembly fullName="Gallio, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="Gallio.dll"
qualifyPartialName="true" />
</assemblies>
<services>
<service serviceId="Gallio.Common.Concurrency.ProcessCreator"
serviceType="Gallio.Common.Concurrency.IProcessCreator, Gallio" />
<service serviceId="Gallio.Common.Concurrency.ProcessFinder"
serviceType="Gallio.Common.Concurrency.IProcessFinder, Gallio" />
<service serviceId="Gallio.FileSystem"
serviceType="Gallio.Common.IO.IFileSystem, Gallio" />
<service serviceId="Gallio.XmlSerializer"
serviceType="Gallio.Common.Xml.IXmlSerializer, Gallio" />
<service serviceId="Gallio.HostFactory"
serviceType="Gallio.Runtime.Hosting.IHostFactory, Gallio" />
<service serviceId="Gallio.Debugger"
serviceType="Gallio.Runtime.Debugging.IDebugger, Gallio" />
<service serviceId="Gallio.DebuggerManager"
serviceType="Gallio.Runtime.Debugging.IDebuggerManager, Gallio" />
<service serviceId="Gallio.FileTypeRecognizer"
serviceType="Gallio.Runtime.FileTypes.IFileTypeRecognizer, Gallio"
defaultComponentType="Gallio.Runtime.FileTypes.SimpleFileTypeRecognizer, Gallio" />
<service serviceId="Gallio.FileTypeManager"
serviceType="Gallio.Runtime.FileTypes.IFileTypeManager, Gallio" />
<service serviceId="Gallio.UtilityCommandManager"
serviceType="Gallio.Runtime.UtilityCommands.IUtilityCommandManager, Gallio" />
<service serviceId="Gallio.UtilityCommand"
serviceType="Gallio.Runtime.UtilityCommands.IUtilityCommand, Gallio" />
<service serviceId="Gallio.InstallerManager"
serviceType="Gallio.Runtime.Installer.IInstallerManager, Gallio" />
<service serviceId="Gallio.Installer"
serviceType="Gallio.Runtime.Installer.IInstaller, Gallio" />
<service serviceId="Gallio.Converter"
serviceType="Gallio.Runtime.Conversions.IConverter, Gallio" />
<service serviceId="Gallio.ConversionRule"
serviceType="Gallio.Runtime.Conversions.IConversionRule, Gallio" />
<service serviceId="Gallio.Formatter"
serviceType="Gallio.Runtime.Formatting.IFormatter, Gallio" />
<service serviceId="Gallio.FormattingRule"
serviceType="Gallio.Runtime.Formatting.IFormattingRule, Gallio" />
<service serviceId="Gallio.ElevatedCommand"
serviceType="Gallio.Runtime.Security.IElevatedCommand, Gallio" />
<service serviceId="Gallio.ElevationManager"
serviceType="Gallio.Runtime.Security.IElevationManager, Gallio" />
<service serviceId="Gallio.PreferenceManager"
serviceType="Gallio.Runtime.Preferences.IPreferenceManager, Gallio" />
<service serviceId="Gallio.TestFramework"
serviceType="Gallio.Model.ITestFramework, Gallio" />
<service serviceId="Gallio.TestFrameworkManager"
serviceType="Gallio.Model.ITestFrameworkManager, Gallio" />
<service serviceId="Gallio.TestKind"
serviceType="Gallio.Model.ITestKind, Gallio"
defaultComponentType="Gallio.Model.DefaultTestKind, Gallio"/>
<service serviceId="Gallio.TestKindManager"
serviceType="Gallio.Model.ITestKindManager, Gallio" />
<service serviceId="Gallio.TestContextTracker"
serviceType="Gallio.Model.Contexts.ITestContextTracker, Gallio" />
<service serviceId="Gallio.TestRunnerFactory"
serviceType="Gallio.Runner.ITestRunnerFactory, Gallio" />
<service serviceId="Gallio.TestIsolationProvider"
serviceType="Gallio.Model.Isolation.ITestIsolationProvider, Gallio" />
<service serviceId="Gallio.ReportFormatter"
serviceType="Gallio.Runner.Reports.IReportFormatter, Gallio" />
<service serviceId="Gallio.TestRunnerManager"
serviceType="Gallio.Runner.ITestRunnerManager, Gallio" />
<service serviceId="Gallio.TestEnvironment"
serviceType="Gallio.Model.Environments.ITestEnvironment, Gallio" />
<service serviceId="Gallio.TestEnvironmentManager"
serviceType="Gallio.Model.Environments.ITestEnvironmentManager, Gallio" />
<service serviceId="Gallio.ReportManager"
serviceType="Gallio.Runner.Reports.IReportManager, Gallio" />
<service serviceId="Gallio.TestProjectManager"
serviceType="Gallio.Runner.Projects.ITestProjectManager, Gallio" />
<service serviceId="Gallio.TestRunnerExtensionFactory"
serviceType="Gallio.Runner.Extensions.ITestRunnerExtensionFactory, Gallio" />
<service serviceId="Gallio.TestRunnerExtensionManager"
serviceType="Gallio.Runner.Extensions.ITestRunnerExtensionManager, Gallio" />
<service serviceId="Gallio.PatternTestController"
serviceType="Gallio.Framework.Pattern.PatternTestController, Gallio" />
<service serviceId="Gallio.ExtensionPoints"
serviceType="Gallio.Runtime.Extensibility.IExtensionPoints, Gallio" />
<service serviceId="Gallio.ComparisonSemantics"
serviceType="Gallio.Framework.IComparisonSemantics, Gallio" />
</services>
<components>
<component componentId="Gallio.FallbackTestFramework"
serviceId="Gallio.TestFramework"
componentType="Gallio.Model.FallbackTestFramework, Gallio">
<traits>
<name>Fallback</name>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestFrameworkManager"
serviceId="Gallio.TestFrameworkManager"
componentType="Gallio.Model.DefaultTestFrameworkManager, Gallio">
<parameters>
<fallbackTestFrameworkHandle>${Gallio.FallbackTestFramework}</fallbackTestFrameworkHandle>
</parameters>
</component>
<component componentId="Gallio.TestRunnerManager"
serviceId="Gallio.TestRunnerManager"
componentType="Gallio.Runner.DefaultTestRunnerManager, Gallio" />
<component componentId="Gallio.TestEnvironmentManager"
serviceId="Gallio.TestEnvironmentManager"
componentType="Gallio.Model.Environments.DefaultTestEnvironmentManager, Gallio" />
<component componentId="Gallio.ConsoleTestEnvironment"
serviceId="Gallio.TestEnvironment"
componentType="Gallio.Model.Environments.ConsoleTestEnvironment, Gallio" />
<component componentId="Gallio.TraceTestEnvironment"
serviceId="Gallio.TestEnvironment"
componentType="Gallio.Model.Environments.TraceTestEnvironment, Gallio" />
<component componentId="Gallio.UnhandledExceptionTestEnvironment"
serviceId="Gallio.TestEnvironment"
componentType="Gallio.Model.Environments.UnhandledExceptionTestEnvironment, Gallio" />
<component componentId="Gallio.CustomTestEnvironment"
serviceId="Gallio.TestEnvironment"
componentType="Gallio.Model.Environments.CustomTestEnvironment, Gallio" />
<component componentId="Gallio.WindowsFormsTestEnvironment"
serviceId="Gallio.TestEnvironment"
componentType="Gallio.Model.Environments.WindowsFormsTestEnvironment, Gallio" />
<component componentId="Gallio.ReportManager"
serviceId="Gallio.ReportManager"
componentType="Gallio.Runner.Reports.DefaultReportManager, Gallio" />
<component componentId="Gallio.TestProjectManager"
serviceId="Gallio.TestProjectManager"
componentType="Gallio.Runner.Projects.DefaultTestProjectManager, Gallio" />
<component componentId="Gallio.TestContextTracker"
serviceId="Gallio.TestContextTracker"
componentType="Gallio.Model.Contexts.DefaultTestContextTracker, Gallio" />
<component componentId="Gallio.PatternTestController"
serviceId="Gallio.PatternTestController"
componentType="Gallio.Framework.Pattern.PatternTestController, Gallio" />
<component componentId="Gallio.DebuggerManager"
serviceId="Gallio.DebuggerManager"
componentType="Gallio.Runtime.Debugging.DefaultDebuggerManager, Gallio" />
<component componentId="Gallio.ElevationManager"
serviceId="Gallio.ElevationManager"
componentType="Gallio.Runtime.Security.DefaultElevationManager, Gallio" />
<component componentId="Gallio.PreferenceManager"
serviceId="Gallio.PreferenceManager"
componentType="Gallio.Runtime.Preferences.FilePreferenceManager, Gallio" />
<component componentId="Gallio.ExtensionPoints"
serviceId="Gallio.ExtensionPoints"
componentType="Gallio.Runtime.Extensibility.DefaultExtensionPoints, Gallio" />
<component componentId="Gallio.ComparisonSemantics"
serviceId="Gallio.ComparisonSemantics"
componentType="Gallio.Framework.DefaultComparisonSemantics, Gallio" />
<!-- Host Factories -->
<component componentId="Gallio.LocalHostFactory"
serviceId="Gallio.HostFactory"
componentType="Gallio.Runtime.Hosting.LocalHostFactory, Gallio" />
<component componentId="Gallio.IsolatedAppDomainHostFactory"
serviceId="Gallio.HostFactory"
componentType="Gallio.Runtime.Hosting.IsolatedAppDomainHostFactory, Gallio" />
<component componentId="Gallio.IsolatedProcessHostFactory"
serviceId="Gallio.HostFactory"
componentType="Gallio.Runtime.Hosting.IsolatedProcessHostFactory, Gallio" />
<!-- Test Runner Factories -->
<component componentId="Gallio.LocalTestRunnerFactory"
serviceId="Gallio.TestRunnerFactory"
componentType="Gallio.Runner.DefaultTestRunnerFactory, Gallio">
<parameters>
<testIsolationProvider>${Gallio.LocalTestIsolationProvider}</testIsolationProvider>
</parameters>
<traits>
<name>Local</name>
<description>Runs tests locally within the same process and AppDomain as the test runner application. Each test isolation context runs locally. This mode offers no isolation between tests and the test runner; it does not support loading test assembly configuration files or using a different runtime version or processor architecture.</description>
</traits>
</component>
<component componentId="Gallio.IsolatedAppDomainTestRunnerFactory"
serviceId="Gallio.TestRunnerFactory"
componentType="Gallio.Runner.DefaultTestRunnerFactory, Gallio">
<parameters>
<testIsolationProvider>${Gallio.IsolatedAppDomainTestIsolationProvider}</testIsolationProvider>
</parameters>
<traits>
<name>IsolatedAppDomain</name>
<description>Runs tests within an isolated AppDomain of the same process as the test runner application. Each test isolation context runs in its own AppDomain. This mode provides lightweight but limited isolation between tests and the test runner; it does not support using different runtime version or processor architecture.</description>
</traits>
</component>
<component componentId="Gallio.IsolatedProcessTestRunnerFactory"
serviceId="Gallio.TestRunnerFactory"
componentType="Gallio.Runner.DefaultTestRunnerFactory, Gallio">
<parameters>
<testIsolationProvider>${Gallio.IsolatedProcessTestIsolationProvider}</testIsolationProvider>
</parameters>
<traits>
<name>IsolatedProcess</name>
<description>Runs tests within an isolated process external to the test runner. Each test isolation context runs in its own process. This mode protects the test runner application from most faults that may occur during test execution; it supports all features.</description>
</traits>
</component>
<!-- Test Isolation Providers -->
<component componentId="Gallio.LocalTestIsolationProvider"
serviceId="Gallio.TestIsolationProvider"
componentType="Gallio.Model.Isolation.HostedTestIsolationProvider, Gallio">
<parameters>
<hostFactory>${Gallio.LocalHostFactory}</hostFactory>
</parameters>
</component>
<component componentId="Gallio.IsolatedAppDomainTestIsolationProvider"
serviceId="Gallio.TestIsolationProvider"
componentType="Gallio.Model.Isolation.HostedTestIsolationProvider, Gallio">
<parameters>
<hostFactory>${Gallio.IsolatedAppDomainHostFactory}</hostFactory>
</parameters>
</component>
<component componentId="Gallio.IsolatedProcessTestIsolationProvider"
serviceId="Gallio.TestIsolationProvider"
componentType="Gallio.Model.Isolation.HostedTestIsolationProvider, Gallio">
<parameters>
<hostFactory>${Gallio.IsolatedProcessHostFactory}</hostFactory>
</parameters>
</component>
<component componentId="Gallio.TestRunnerExtensionManager"
serviceId="Gallio.TestRunnerExtensionManager"
componentType="Gallio.Runner.Extensions.DefaultTestRunnerExtensionManager, Gallio" />
<!-- Converters -->
<component componentId="Gallio.Converter"
serviceId="Gallio.Converter"
componentType="Gallio.Runtime.Conversions.RuleBasedConverter, Gallio" />
<component componentId="Gallio.ArrayToArrayConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.ArrayToArrayConversionRule, Gallio" />
<component componentId="Gallio.ConvertibleToConvertibleConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.ConvertibleToConvertibleConversionRule, Gallio" />
<component componentId="Gallio.ObjectToStringConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.ObjectToStringConversionRule, Gallio" />
<component componentId="Gallio.StringToXmlDocumentConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.StringToXmlDocumentConversionRule, Gallio" />
<component componentId="Gallio.XPathNavigableToXPathNavigatorConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.XPathNavigableToXPathNavigatorConversionRule, Gallio" />
<component componentId="Gallio.XPathNavigatorToStringConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.XPathNavigatorToStringConversionRule, Gallio" />
<component componentId="Gallio.XPathNavigatorToXmlSerializableTypeConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.XPathNavigatorToXmlSerializableTypeConversionRule, Gallio" />
<component componentId="Gallio.StringToEnumConversionRule"
serviceId="Gallio.ConversionRule"
componentType="Gallio.Runtime.Conversions.StringToEnumConversionRule, Gallio" />
<!-- Formatters -->
<component componentId="Gallio.Formatter"
serviceId="Gallio.Formatter"
componentType="Gallio.Runtime.Formatting.RuleBasedFormatter, Gallio" />
<component componentId="Gallio.BooleanFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.BooleanFormattingRule, Gallio" />
<component componentId="Gallio.ByteFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.ByteFormattingRule, Gallio" />
<component componentId="Gallio.CharFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.CharFormattingRule, Gallio" />
<component componentId="Gallio.ConvertToStringFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.ConvertToStringFormattingRule, Gallio" />
<component componentId="Gallio.DateTimeFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.DateTimeFormattingRule, Gallio" />
<component componentId="Gallio.DBNullFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.DBNullFormattingRule, Gallio" />
<component componentId="Gallio.DecimalFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.DecimalFormattingRule, Gallio" />
<component componentId="Gallio.DictionaryEntryFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.DictionaryEntryFormattingRule, Gallio" />
<component componentId="Gallio.DoubleFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.DoubleFormattingRule, Gallio" />
<component componentId="Gallio.EnumerableFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.EnumerableFormattingRule, Gallio" />
<component componentId="Gallio.IntegerFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.IntegerFormattingRule, Gallio" />
<component componentId="Gallio.KeyValuePairFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.KeyValuePairFormattingRule, Gallio" />
<component componentId="Gallio.SByteFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.SByteFormattingRule, Gallio" />
<component componentId="Gallio.SingleFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.SingleFormattingRule, Gallio" />
<component componentId="Gallio.StringFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.StringFormattingRule, Gallio" />
<component componentId="Gallio.TypeFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.TypeFormattingRule, Gallio" />
<component componentId="Gallio.XPathNavigableFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.XPathNavigableFormattingRule, Gallio" />
<component componentId="Gallio.StructuralFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.StructuralFormattingRule, Gallio" />
<!-- File types -->
<component componentId="Gallio.FileTypeManager"
serviceId="Gallio.FileTypeManager"
componentType="Gallio.Runtime.FileTypes.FileTypeManager, Gallio" />
<component componentId="Gallio.FileTypeRecognizers.Project"
serviceId="Gallio.FileTypeRecognizer">
<traits>
<id>Project</id>
<description>A Gallio project file.</description>
<fileNameRegex>.*\.gallio</fileNameRegex>
</traits>
</component>
<component componentId="Gallio.FileTypeRecognizers.Executable"
serviceId="Gallio.FileTypeRecognizer">
<traits>
<id>Executable</id>
<description>A library or program file.</description>
<fileNameRegex>.*\.(dll|exe)</fileNameRegex>
</traits>
</component>
<component componentId="Gallio.FileTypeRecognizers.Assembly"
serviceId="Gallio.FileTypeRecognizer"
componentType="Gallio.Runtime.FileTypes.AssemblyFileTypeRecognizer, Gallio">
<traits>
<id>Assembly</id>
<description>A .Net assembly.</description>
<superTypeId>Executable</superTypeId>
</traits>
</component>
<!-- Common helpers -->
<component componentId="Gallio.Common.Concurrency.ProcessCreator"
serviceId="Gallio.Common.Concurrency.ProcessCreator"
componentType="Gallio.Common.Concurrency.ProcessCreator, Gallio" />
<component componentId="Gallio.Common.Concurrency.ProcessFinder"
serviceId="Gallio.Common.Concurrency.ProcessFinder"
componentType="Gallio.Common.Concurrency.ProcessFinder, Gallio" />
<component componentId="Gallio.FileSystem"
serviceId="Gallio.FileSystem"
componentType="Gallio.Common.IO.FileSystem, Gallio" />
<component componentId="Gallio.XmlSerializer"
serviceId="Gallio.XmlSerializer"
componentType="Gallio.Common.Xml.DefaultXmlSerializer, Gallio" />
<!-- Utility commands -->
<component componentId="Gallio.UtilityCommandManager"
serviceId="Gallio.UtilityCommandManager"
componentType="Gallio.Runtime.UtilityCommands.DefaultUtilityCommandManager, Gallio" />
<component componentId="Gallio.ClearCurrentUserPluginCacheUtilityCommand"
serviceId="Gallio.UtilityCommand"
componentType="Gallio.Runtime.UtilityCommands.ClearCurrentUserPluginCacheUtilityCommand, Gallio">
<traits>
<!-- Note: This particular command name is special and is also hardcoded in the Gallio.Utility.exe program itself
because we want to be able to run the command without initializing the runtime itself.
-->
<name>ClearCurrentUserPluginCache</name>
<description>Clears the plugin cache of the current user.</description>
</traits>
</component>
<component componentId="Gallio.FormatReportUtilityCommand"
serviceId="Gallio.UtilityCommand"
componentType="Gallio.Runtime.UtilityCommands.FormatReportUtilityCommand, Gallio">
<traits>
<name>FormatReport</name>
<description>Formats an existing XML test report. The command must be used with the following syntax:
"FormatReport {file} /ReportType:{type} [/ReportNameFormat:{format} /ReportOutput:{dir} /ReportArchive]"
- {file} is the relative or absolute path of the existing XML test report.
- ReportType (short form: /rt) specifies the type of the output report ('txt', 'txt-common', 'txt-condensed', 'html', 'html+xhtml', 'html-condensed', 'xhtml', 'xhtml-condensed', 'ccnet-details', or 'ccnet-details-condensed')
- ReportNameFormat (short form: /rnf) specifies the format of the output report (optional; if not specified, the same name is kept). The tags '{0}' and '{1}' are replaced respectively by the date and the time of the test run, or by the curent date/time if not applicable.
- ReportOutput (short form: /ro) specifies the output directory (optional; if not specified the current directory is used).
- ReportArchive (short form: /ra) compresses the output report in a file archive (zip).</description>
</traits>
</component>
<component componentId="Gallio.VerifyInstallationUtilityCommand"
serviceId="Gallio.UtilityCommand"
componentType="Gallio.Runtime.UtilityCommands.VerifyInstallationUtilityCommand, Gallio">
<traits>
<name>VerifyInstallation</name>
<description>Checks for runtime installation errors.</description>
</traits>
</component>
<component componentId="Gallio.SetupUtilityCommand"
serviceId="Gallio.UtilityCommand"
componentType="Gallio.Runtime.Installer.SetupUtilityCommand, Gallio">
<traits>
<name>Setup</name>
<description>Installs or uninstalls components.</description>
</traits>
</component>
<component componentId="Gallio.ResetInstallationIdUtilityCommand"
serviceId="Gallio.UtilityCommand"
componentType="Gallio.Runtime.UtilityCommands.ResetInstallationIdUtilityCommand, Gallio">
<traits>
<name>ResetInstallationId</name>
<description>Resets the installation id. The plugin list will be refreshed the next time a Gallio application is started.</description>
</traits>
</component>
<component componentId="Gallio.ResetInstallationIdElevatedCommand"
serviceId="Gallio.ElevatedCommand"
componentType="Gallio.Runtime.UtilityCommands.ResetInstallationIdElevatedCommand, Gallio" />
<!-- Installers -->
<component componentId="Gallio.InstallerElevatedCommand"
serviceId="Gallio.ElevatedCommand"
componentType="Gallio.Runtime.Installer.InstallerElevatedCommand, Gallio" />
<component componentId="Gallio.InstallerManager"
serviceId="Gallio.InstallerManager"
componentType="Gallio.Runtime.Installer.DefaultInstallerManager, Gallio" />
<!-- Test Kinds -->
<component componentId="Gallio.TestKindManager"
serviceId="Gallio.TestKindManager"
componentType="Gallio.Model.DefaultTestKindManager, Gallio" />
<component componentId="Gallio.TestKinds.Root"
serviceId="Gallio.TestKind">
<traits>
<name>Root</name>
<description>The root node of the test tree.</description>
<icon>plugin://Gallio/Resources/Assembly.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.Assembly"
serviceId="Gallio.TestKind">
<traits>
<name>Assembly</name>
<description>A test assembly.</description>
<icon>plugin://Gallio/Resources/Assembly.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.File"
serviceId="Gallio.TestKind">
<traits>
<name>File</name>
<description>A test file.</description>
<icon>plugin://Gallio/Resources/Container.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.Namespace"
serviceId="Gallio.TestKind">
<traits>
<name>Namespace</name>
<description>A test namespace.</description>
<icon>plugin://Gallio/Resources/Container.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.Group"
serviceId="Gallio.TestKind">
<traits>
<name>Group</name>
<description>A test group.</description>
<icon>plugin://Gallio/Resources/Container.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.Suite"
serviceId="Gallio.TestKind">
<traits>
<name>Suite</name>
<description>A test suite.</description>
<icon>plugin://Gallio/Resources/Container.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.Fixture"
serviceId="Gallio.TestKind">
<traits>
<name>Fixture</name>
<description>A test fixture.</description>
<icon>plugin://Gallio/Resources/Fixture.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.Test"
serviceId="Gallio.TestKind">
<traits>
<name>Test</name>
<description>A test case.</description>
<icon>plugin://Gallio/Resources/Test.ico</icon>
</traits>
</component>
<component componentId="Gallio.TestKinds.Unsupported"
serviceId="Gallio.TestKind">
<traits>
<name>Unsupported</name>
<description>An unsupported test.</description>
<icon>plugin://Gallio/Resources/Unsupported.ico</icon>
</traits>
</component>
</components>
</plugin>

44319
lib/Gallio_3.2.517.0/Gallio.xml

File diff suppressed because it is too large

BIN
lib/Gallio_3.2.517.0/Gallio35.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/Gallio35.pdb

Binary file not shown.

35
lib/Gallio_3.2.517.0/Gallio35.plugin

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio35"
recommendedInstallationPath=""
enableCondition="${minFramework:NET35}"
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Extensions for .Net 3.5</name>
<version>3.2.0.0</version>
<description>Provides additional Gallio features for use with .Net 3.5.</description>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="Gallio35.plugin" />
<file path="Gallio35.dll" />
<file path="Gallio35.pdb" />
<file path="Gallio35.xml" />
</files>
<assemblies>
<assembly fullName="Gallio35, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="Gallio35.dll"
qualifyPartialName="true" />
</assemblies>
<components>
<component componentId="Gallio35.ExpressionFormattingRule"
serviceId="Gallio.FormattingRule"
componentType="Gallio.Runtime.Formatting.ExpressionFormattingRule, Gallio35" />
</components>
</plugin>

293
lib/Gallio_3.2.517.0/Gallio35.xml

@ -0,0 +1,293 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Gallio35</name>
</assembly>
<members>
<member name="T:Gallio.Common.Linq.ActionExtensions">
<summary>
Extension methods for <see cref="T:Gallio.Common.Action"/> delegates.
</summary>
</member>
<member name="M:Gallio.Common.Linq.ActionExtensions.AsUnitFunc(System.Action)">
<summary>
Wraps an action as a function that returns a dummy <see cref="T:Gallio.Common.Unit"/> value.
</summary>
<returns>The function.</returns>
</member>
<member name="T:Gallio.Common.Linq.ExpressionExtensions">
<summary>
Extension methods for <see cref="T:System.Linq.Expressions.Expression`1"/>.
</summary>
</member>
<member name="M:Gallio.Common.Linq.ExpressionExtensions.Bind``2(System.Linq.Expressions.Expression{System.Func{``0,``1}},``0)">
<summary>
Binds the arguments of a function expression.
</summary>
<typeparam name="T">The parameter type.</typeparam>
<typeparam name="TResult">The result type.</typeparam>
<param name="expr">The expression.</param>
<param name="arg">The argument value.</param>
<returns>The bound function.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionExtensions.Bind``3(System.Linq.Expressions.Expression{System.Func{``0,``2}},``0,``1)">
<summary>
Binds the arguments of a function expression.
</summary>
<typeparam name="T1">The first parameter type.</typeparam>
<typeparam name="T2">The second parameter type.</typeparam>
<typeparam name="TResult">The result type.</typeparam>
<param name="expr">The expression.</param>
<param name="arg1">The first argument value.</param>
<param name="arg2">The second argument value.</param>
<returns>The bound function.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionExtensions.IsCapturedVariable(System.Linq.Expressions.Expression)">
<summary>
Returns true if the expression represents a captured variable within a closure.
</summary>
<param name="expr">The expression.</param>
<returns>True if the expression represents a captured variable.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionExtensions.IsCapturedVariable(System.Linq.Expressions.MemberExpression)">
<summary>
Returns true if the expression represents a captured variable within a closure.
</summary>
<param name="expr">The expression.</param>
<returns>True if the expression represents a captured variable.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionExtensions.IsCapturedVariableOrParameter(System.Linq.Expressions.Expression)">
<summary>
Returns true if the expression represents a captured variable or a parameter.
</summary>
<param name="expr">The expression.</param>
<returns>True if the expression represents a captured variable or a parameter.</returns>
</member>
<member name="T:Gallio.Common.Linq.ExpressionInstrumentor">
<summary>
Instuments an <see cref="T:System.Linq.Expressions.Expression`1"/> to intercept intermediate results
from each sub-expression.
</summary>
</member>
<member name="M:Gallio.Common.Linq.ExpressionInstrumentor.Compile``1(System.Linq.Expressions.Expression{``0})">
<summary>
Compiles an expression to introduce trace points.
</summary>
<typeparam name="T">The expression type.</typeparam>
<param name="expr">The expression tree.</param>
<returns>The compiled delegate representing expression.</returns>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="expr"/> is null.</exception>
</member>
<member name="M:Gallio.Common.Linq.ExpressionInstrumentor.Rewrite``1(System.Linq.Expressions.Expression{``0})">
<summary>
Rewrites an expression tree to introduce trace points.
</summary>
<typeparam name="T">The expression type.</typeparam>
<param name="expr">The expression tree.</param>
<returns>The compiled delegate representing expression.</returns>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="expr"/> is null.</exception>
</member>
<member name="M:Gallio.Common.Linq.ExpressionInstrumentor.Intercept``1(System.Linq.Expressions.Expression,System.Func{``0})">
<summary>
Evaluates a sub-expression and collects trace information.
</summary>
<typeparam name="T">The return type of the sub-expression.</typeparam>
<param name="expr">The sub-expression to evaluate.</param>
<param name="continuation">The continuation that evaluates the sub-expression.</param>
<returns>The result of the evaluation.</returns>
</member>
<member name="T:Gallio.Common.Linq.ExpressionVisitor`1">
<summary>
Performs different actions depending on the type of <see cref="T:System.Linq.Expressions.Expression"/> visited.
</summary>
<typeparam name="T">The visitor result type.</typeparam>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.Visit(System.Linq.Expressions.Expression)">
<summary>
Visits the expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitBinary(System.Linq.Expressions.BinaryExpression)">
<summary>
Visits a binary expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitUnary(System.Linq.Expressions.UnaryExpression)">
<summary>
Visits a unary expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitMethodCall(System.Linq.Expressions.MethodCallExpression)">
<summary>
Visits a call expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitConditional(System.Linq.Expressions.ConditionalExpression)">
<summary>
Visits a conditional expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitConstant(System.Linq.Expressions.ConstantExpression)">
<summary>
Visits a constant expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitInvocation(System.Linq.Expressions.InvocationExpression)">
<summary>
Visits an invocation expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitLambda(System.Linq.Expressions.LambdaExpression)">
<summary>
Visits a lambda expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitListInit(System.Linq.Expressions.ListInitExpression)">
<summary>
Visits an list init expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitMember(System.Linq.Expressions.MemberExpression)">
<summary>
Visits a member access expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitMemberInit(System.Linq.Expressions.MemberInitExpression)">
<summary>
Visits a member init expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitNew(System.Linq.Expressions.NewExpression)">
<summary>
Visits a new expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitNewArray(System.Linq.Expressions.NewArrayExpression)">
<summary>
Visits a new array expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitParameter(System.Linq.Expressions.ParameterExpression)">
<summary>
Visits a parameter expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitTypeBinary(System.Linq.Expressions.TypeBinaryExpression)">
<summary>
Visits a type binary expression.
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="M:Gallio.Common.Linq.ExpressionVisitor`1.VisitAny(System.Linq.Expressions.Expression)">
<summary>
<para>
Visits an expression of any type that does not have other special behavior.
</para>
<para>
The default implementation throws <see cref="T:System.NotSupportedException"/>.
</para>
</summary>
<param name="expr">The expression.</param>
<returns>The result.</returns>
</member>
<member name="T:Gallio.Common.Linq.NamespaceDoc">
<summary>
The Gallio.Common.Linq namespace contains types for manipulating Linq expressions.
</summary>
</member>
<member name="T:Gallio.Framework.Assertions.AssertionConditionEvaluator">
<summary>
Evaluates a conditional expression. If the condition evaluates differently
than expected, returns a detailed <see cref="T:Gallio.Framework.Assertions.AssertionFailure"/> that
describes the formatted values of relevant sub-expressions within the condtion.
</summary>
</member>
<member name="M:Gallio.Framework.Assertions.AssertionConditionEvaluator.Eval(System.Linq.Expressions.Expression{System.Func{System.Boolean}},System.Boolean,System.String,System.Object[])">
<summary>
Evaluates a conditional expression.
</summary>
<param name="condition">The conditional expression.</param>
<param name="expectedResult">The expected result.</param>
<param name="messageFormat">The custom assertion message format, or null if none.</param>
<param name="messageArgs">The custom assertion message arguments, or null if none.</param>
<returns>The assertion failure if the conditional expression evaluated
to a different result than was expected or threw an exception, otherwise null.</returns>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="condition"/> is null.</exception>
</member>
<member name="T:Gallio.Runtime.Formatting.ExpressionFormattingRule">
<summary>
A formatting rule for <see cref="T:System.Linq.Expressions.Expression"/>.
</summary>
<remarks>
<para>
Formats expression trees using a more familiar C#-like syntax than
the default. Also recognizes captured variables and displays them
naturally to conceal the implied field access to an anonymous class.
</para>
<para>
Made-up syntax for nodes that cannot be directly represented in C#.
<list type="bullet">
<item>Power operator: **, as in a ** b</item>
<item>Quote expression: `...`, as in `a + b`</item>
<item>Constants: formatted recursively using other formatters, which may yield unusual syntax</item>
</list>
</para>
</remarks>
</member>
<member name="M:Gallio.Runtime.Formatting.ExpressionFormattingRule.GetPriority(System.Type)">
<inheritdoc />
</member>
<member name="M:Gallio.Runtime.Formatting.ExpressionFormattingRule.Format(System.Object,Gallio.Runtime.Formatting.IFormatter)">
<inheritdoc />
</member>
<member name="T:Gallio.Runtime.Formatting.FormatterExtensions">
<summary>
Extensions methods for formatting.
</summary>
</member>
<member name="M:Gallio.Runtime.Formatting.FormatterExtensions.Format(System.Object)">
<summary>
Formats an object using the default <see cref="T:Gallio.Runtime.Formatting.IFormatter"/>.
</summary>
<param name="obj">The object to format.</param>
<returns>The formatted object.</returns>
</member>
<member name="M:Gallio.Runtime.Formatting.FormatterExtensions.Format(System.Object,Gallio.Runtime.Formatting.IFormatter)">
<summary>
Formats an object using the specified <see cref="T:Gallio.Runtime.Formatting.IFormatter"/>.
</summary>
<param name="obj">The object to format.</param>
<param name="formatter">The formatter to use, or null for the default.</param>
<returns>The formatted object.</returns>
</member>
</members>
</doc>

BIN
lib/Gallio_3.2.517.0/Gallio40.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/Gallio40.pdb

Binary file not shown.

29
lib/Gallio_3.2.517.0/Gallio40.plugin

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="Gallio40"
recommendedInstallationPath=""
enableCondition="${minFramework:NET40}"
xmlns="http://www.gallio.org/">
<traits>
<name>Gallio Extensions for .Net 4.0</name>
<version>3.2.0.0</version>
<description>Provides additional Gallio features for use with .Net 4.0.</description>
<icon>plugin://Gallio/Resources/Gallio.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio35" />
</dependencies>
<files>
<file path="Gallio40.plugin" />
<file path="Gallio40.dll" />
<file path="Gallio40.pdb" />
<file path="Gallio40.xml" />
</files>
<assemblies>
<assembly fullName="Gallio40, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="Gallio40.dll"
qualifyPartialName="true" />
</assemblies>
</plugin>

8
lib/Gallio_3.2.517.0/Gallio40.xml

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Gallio40</name>
</assembly>
<members>
</members>
</doc>

BIN
lib/Gallio_3.2.517.0/ICSharpCode.TextEditor.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/MbUnit.Compatibility.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/MbUnit.Compatibility.pdb

Binary file not shown.

28
lib/Gallio_3.2.517.0/MbUnit.Compatibility.plugin

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="MbUnit.Compatibility"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>MbUnit v3 Extensions for Backwards Compatibility</name>
<version>3.2.0.0</version>
<description>Provides extensions for MbUnit v3 to assist with test migration from MbUnit v2.</description>
<icon>plugin://MbUnit/Resources/MbUnit.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="MbUnit.Compatibility.plugin" />
<file path="MbUnit.Compatibility.dll" />
<file path="MbUnit.Compatibility.pdb" />
<file path="MbUnit.Compatibility.xml" />
</files>
<assemblies>
<assembly fullName="MbUnit.Compatibility, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="MbUnit.Compatibility.dll"
qualifyPartialName="true" />
</assemblies>
</plugin>

3419
lib/Gallio_3.2.517.0/MbUnit.Compatibility.xml

File diff suppressed because it is too large

BIN
lib/Gallio_3.2.517.0/MbUnit.dll

Binary file not shown.

6
lib/Gallio_3.2.517.0/MbUnit.dll.tdnet

@ -0,0 +1,6 @@
<TestRunner>
<FriendlyName>MbUnit v{0}.{1}</FriendlyName>
<AssemblyPath>TDNet\Gallio.TDNetRunner.dll</AssemblyPath>
<TypeName>Gallio.TDNetRunner.GallioResidentTestRunner</TypeName>
<TestRunnerType>Resident</TestRunnerType>
</TestRunner>

BIN
lib/Gallio_3.2.517.0/MbUnit.pdb

Binary file not shown.

54
lib/Gallio_3.2.517.0/MbUnit.plugin

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="MbUnit"
recommendedInstallationPath=""
xmlns="http://www.gallio.org/">
<traits>
<name>MbUnit v3</name>
<version>3.2.0.0</version>
<description>Provides support for running MbUnit v3 tests.</description>
<icon>plugin://MbUnit/Resources/MbUnit.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio" />
</dependencies>
<files>
<file path="MbUnit.plugin" />
<file path="MbUnit.dll" />
<file path="MbUnit.dll.tdnet" />
<file path="MbUnit.pdb" />
<file path="MbUnit.xml" />
<file path="Resources\MbUnit.ico" />
</files>
<assemblies>
<assembly fullName="MbUnit, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="MbUnit.dll"
qualifyPartialName="true" />
</assemblies>
<components>
<component componentId="MbUnit.TestFramework"
serviceId="Gallio.TestFramework"
componentType="MbUnit.Core.MbUnitTestFramework, MbUnit">
<traits>
<name>MbUnit v3</name>
<frameworkAssemblies>MbUnit, Version=3.2.0.0</frameworkAssemblies>
<icon>plugin://MbUnit/Resources/MbUnit.ico</icon>
<version>3.2.0.0</version>
<fileTypes>Assembly</fileTypes>
</traits>
</component>
<component componentId="MbUnit.TestKinds.MbUnitTestAssembly"
serviceId="Gallio.TestKind">
<traits>
<name>MbUnit v3 Assembly</name>
<description>MbUnit v3 Test Assembly</description>
<icon>plugin://MbUnit/Resources/MbUnit.ico</icon>
</traits>
</component>
</components>
</plugin>

11494
lib/Gallio_3.2.517.0/MbUnit.xml

File diff suppressed because it is too large

BIN
lib/Gallio_3.2.517.0/MbUnit35.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/MbUnit35.pdb

Binary file not shown.

30
lib/Gallio_3.2.517.0/MbUnit35.plugin

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="MbUnit35"
recommendedInstallationPath=""
enableCondition="${minFramework:NET35}"
xmlns="http://www.gallio.org/">
<traits>
<name>MbUnit v3 Extensions for .Net 3.5</name>
<version>3.2.0.0</version>
<description>Provides additional MbUnit v3 features for use with .Net 3.5.</description>
<icon>plugin://MbUnit/Resources/MbUnit.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio35" />
<dependency pluginId="MbUnit" />
</dependencies>
<files>
<file path="MbUnit35.plugin" />
<file path="MbUnit35.dll" />
<file path="MbUnit35.pdb" />
<file path="MbUnit35.xml" />
</files>
<assemblies>
<assembly fullName="MbUnit35, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="MbUnit35.dll"
qualifyPartialName="true" />
</assemblies>
</plugin>

47
lib/Gallio_3.2.517.0/MbUnit35.xml

@ -0,0 +1,47 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>MbUnit35</name>
</assembly>
<members>
<member name="T:MbUnit.Framework.AssertEx">
<summary>
Provides extended assertions for .Net 3.5.
</summary>
</member>
<member name="M:MbUnit.Framework.AssertEx.That(System.Linq.Expressions.Expression{System.Func{System.Boolean}})">
<summary>
Verifies that a particular condition holds true.
</summary>
<remarks>
<para>
If the condition evaluates to false, the assertion failure message will
describe in detail the intermediate value of relevant sub-expressions within
the condition. Consequently the assertion failure will include more diagnostic
information than if <see cref="M:MbUnit.Framework.Assert.IsTrue(System.Boolean)"/> were used instead.
</para>
</remarks>
<param name="condition">The conditional expression to evaluate.</param>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="condition"/> is null.</exception>
<exception cref="T:Gallio.Framework.Assertions.AssertionException">Thrown if the verification failed unless the current <see cref="P:Gallio.Framework.Assertions.AssertionContext.AssertionFailureBehavior"/> indicates otherwise.</exception>
</member>
<member name="M:MbUnit.Framework.AssertEx.That(System.Linq.Expressions.Expression{System.Func{System.Boolean}},System.String,System.Object[])">
<summary>
Verifies that a particular condition holds true.
</summary>
<remarks>
<para>
If the condition evaluates to false, the assertion failure message will
describe in detail the intermediate value of relevant sub-expressions within
the condition. Consequently the assertion failure will include more diagnostic
information than if <see cref="M:MbUnit.Framework.Assert.IsTrue(System.Boolean,System.String,System.Object[])"/> were used instead.
</para>
</remarks>
<param name="condition">The conditional expression to evaluate.</param>
<param name="messageFormat">The custom assertion message format, or null if none.</param>
<param name="messageArgs">The custom assertion message arguments, or null if none.</param>
<exception cref="T:System.ArgumentNullException">Thrown if <paramref name="condition"/> is null.</exception>
<exception cref="T:Gallio.Framework.Assertions.AssertionException">Thrown if the verification failed unless the current <see cref="P:Gallio.Framework.Assertions.AssertionContext.AssertionFailureBehavior"/> indicates otherwise.</exception>
</member>
</members>
</doc>

BIN
lib/Gallio_3.2.517.0/MbUnit40.dll

Binary file not shown.

BIN
lib/Gallio_3.2.517.0/MbUnit40.pdb

Binary file not shown.

30
lib/Gallio_3.2.517.0/MbUnit40.plugin

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<plugin pluginId="MbUnit40"
recommendedInstallationPath=""
enableCondition="${minFramework:NET40}"
xmlns="http://www.gallio.org/">
<traits>
<name>MbUnit v3 Extensions for .Net 4.0</name>
<version>3.2.0.0</version>
<description>Provides additional MbUnit v3 features for use with .Net 4.0.</description>
<icon>plugin://MbUnit/Resources/MbUnit.ico</icon>
</traits>
<dependencies>
<dependency pluginId="Gallio40" />
<dependency pluginId="MbUnit35" />
</dependencies>
<files>
<file path="MbUnit40.plugin" />
<file path="MbUnit40.dll" />
<file path="MbUnit40.pdb" />
<file path="MbUnit40.xml" />
</files>
<assemblies>
<assembly fullName="MbUnit40, Version=3.2.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e"
codeBase="MbUnit40.dll"
qualifyPartialName="true" />
</assemblies>
</plugin>

8
lib/Gallio_3.2.517.0/MbUnit40.xml

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>MbUnit40</name>
</assembly>
<members>
</members>
</doc>

10
lib/Gallio_3.2.517.0/Sources.txt

@ -0,0 +1,10 @@
Gallio v3.2.517.0 was generated from the following sources.
Subversion Repository: http://mb-unit.googlecode.com/svn/trunk/v3
Revision: 2742
Please visit the following Url for checkout instructions.
http://code.google.com/p/mb-unit/source/checkout
Also refer to the wiki for information about how to debug with symbols and source code.
http://www.gallio.org/wiki/gallio:debugging_with_symbols_and_source_code

BIN
lib/Gallio_3.2.517.0/WeifenLuo.WinFormsUI.Docking.dll

Binary file not shown.

31
lib/Gallio_3.2.517.0/licenses/CciMetadata.License.txt

@ -0,0 +1,31 @@
Microsoft Public License (Ms-PL)
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

36
lib/Gallio_3.2.517.0/licenses/Mono.Cecil.license.html

@ -0,0 +1,36 @@
<html>
<head>
<title>Mono.Cecil.license</title>
<Style>
BODY, P, TD { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #666666 }
H2,H3,H4,H5 { color: black; font-weight: bold; }
H2 { font-size: 13pt; }
H3 { font-size: 12pt; }
H4 { font-size: 10pt; color: black; }
</style>
</head>
<body bgcolor="#FFFFFF" color=#000000>
<p>
(C) 2004-2006 Jb Evain
</p>
<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
</p>
<p>
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
</p>
<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</body>
</html>

737
src/MathNet.Numerics.5.1.ReSharper

@ -3,6 +3,743 @@
<ExternalPath IsNull="False">
</ExternalPath>
<Sharing>SOLUTION</Sharing>
<AgentSmithCSharpStyleSettings version="1">
<CodeStyleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CustomDictionaries>
<Dictionaries>
<CustomDictionary>
<Name>en-US</Name>
<CaseSensitive>false</CaseSensitive>
<UserWords>Wishart
Wikipedia</UserWords>
</CustomDictionary>
</Dictionaries>
</CustomDictionaries>
<StringsDictionary>en-US</StringsDictionary>
<IdentifierDictionary>en-US</IdentifierDictionary>
<LastSelectedCustomDictionary>en-US</LastSelectedCustomDictionary>
<CommentsSettings>
<DictionaryName>en-US</DictionaryName>
<CommentMatch>
<Match>
<AccessLevel>Public Protected ProtectedInternal</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</CommentMatch>
<SuppressIfBaseHasComment>false</SuppressIfBaseHasComment>
<MaxLineLength>80</MaxLineLength>
</CommentsSettings>
<NamingConventionSettings>
<Rules>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>EnumerationMember</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Classes, Enumerations, Enumeration values should be named in Pascal</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Public Internal Protected ProtectedInternal</AccessLevel>
<Declaration>Property</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Public Internal Protected ProtectedInternal</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Public Internal Protected ProtectedInternal</AccessLevel>
<Declaration>Event</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Non private properties, methods, events should be in pascal.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Property</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Event</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Private properties, methods, events should be in camel.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Camel</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Field</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Fields should be underscore camel.</Description>
<MustHavePrefixes>
<string>_</string>
</MustHavePrefixes>
<MustNotHavePrefixes>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Camel</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Variable</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Variable should be declared in camel.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Camel</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Parameter</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Function parameters should be in camel.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Camel</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Namespace</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Namespaces should be in Pascal.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>_</string>
<string>m_</string>
</MustNotHavePrefixes>
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Constant</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Constants should be in capital.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>UpperCase</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Constant</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Acronyms should not have more than 2 characters.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>MatchesRegex</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
<Regex>^(?&gt;(XML|SQL|[A-Z]{0,2})[A-Z]?([^A-Z]|$)|[^A-Z]+)*$</Regex>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Constant</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Field</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Private</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>None</AccessLevel>
<Declaration>Namespace</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Names should not have underscore character</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>NotMatchesRegex</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
<Regex>(?&lt;remove&gt;_)</Regex>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<MarkedWithAttribute>NUnit.Framework.TestFixtureAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>TestFixtures should end with Test.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>Test</string>
</MustNotHavePrefixes>
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Test</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Method</Declaration>
<MarkedWithAttribute>NUnit.Framework.TestAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Test methods should start with Test.</Description>
<MustHavePrefixes>
<string>Test</string>
</MustHavePrefixes>
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes>
<string>Test</string>
</MustNotHaveSuffixes>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Enumerations should not end with Enum.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes>
<string>Enum</string>
</MustNotHaveSuffixes>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>EnumerationMember</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Do not name enumerations reserved.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>NotMatchesRegex</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
<Regex>(?&lt;remove&gt;(reserved|Reserved))</Regex>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Event</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Event should not have Before or After prefix.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes>
<string>Before</string>
<string>After</string>
</MustNotHavePrefixes>
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<MarkedWithAttribute>System.FlagsAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Flags enums should have plural names</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>s</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>true</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Enum</Declaration>
<MarkedWithAttribute>System.FlagsAttribute</MarkedWithAttribute>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Enums that are not flags should not have plural names</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes>
<string>s</string>
</MustNotHaveSuffixes>
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Attribute</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Attribute should end with Attribute.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Attribute</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.EventArgs</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>EventArgs should end with EventArgs.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>EventArgs</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Exception</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Exceptions should end with Exception.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Exception</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Stack</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.Stack</InheritedFrom>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches />
<Description>Stack should end with Collection or Stack.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Collection</string>
<string>Stack</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.ICollection</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.IEnumerable</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.ICollection</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<NotMatches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Stack</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Queue</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.Stack</InheritedFrom>
<MarkedWithAttribute />
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</NotMatches>
<Description>Collections should end with Collection.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Collection</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.IDictionary</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Generic.IDictionary</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Dictionary should end with Dictionary.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Dictionary</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Class</Declaration>
<InheritedFrom>System.Collections.Queue</InheritedFrom>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Queue should end with Collection or Queue.</Description>
<MustHavePrefixes />
<MustNotHavePrefixes />
<Rule>None</Rule>
<MustHaveSuffixes>
<string>Collection</string>
<string>Queue</string>
</MustHaveSuffixes>
<MustNotHaveSuffixes />
</NamingConventionRule>
<NamingConventionRule>
<IsDisabled>false</IsDisabled>
<Matches>
<Match>
<AccessLevel>Any</AccessLevel>
<Declaration>Interface</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</Matches>
<Description>Interfaces should be in Pascal and start with I.</Description>
<MustHavePrefixes>
<string>I</string>
</MustHavePrefixes>
<MustNotHavePrefixes />
<Rule>Pascal</Rule>
<MustHaveSuffixes />
<MustNotHaveSuffixes />
</NamingConventionRule>
</Rules>
<Exclusions />
</NamingConventionSettings>
<IdentifiersToSpellCheck>
<Match>
<AccessLevel>Public Protected ProtectedInternal</AccessLevel>
<Declaration>Any</Declaration>
<IsReadOnly>Maybe</IsReadOnly>
<IsStatic>Maybe</IsStatic>
<ParamDirection>Any</ParamDirection>
</Match>
</IdentifiersToSpellCheck>
<PatternsToIgnore>
<string>(?#email)\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*</string>
<string>(?#url)http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?</string>
</PatternsToIgnore>
</CodeStyleSettings>
</AgentSmithCSharpStyleSettings>
<CSharp>
<FormatSettings>
<ANONYMOUS_METHOD_DECLARATION_BRACES>NEXT_LINE</ANONYMOUS_METHOD_DECLARATION_BRACES>

379
src/Numerics/Distributions/Continuous/Beta.cs

@ -3,9 +3,7 @@
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2010 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
@ -14,10 +12,8 @@
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -49,7 +45,7 @@ namespace MathNet.Numerics.Distributions
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to false, all parameter checks can be turned off.</para></remarks>
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Beta : IContinuousDistribution
{
/// <summary>
@ -93,7 +89,7 @@ namespace MathNet.Numerics.Distributions
/// </summary>
/// <param name="a">The a shape parameter of the Beta distribution.</param>
/// <param name="b">The b shape parameter of the Beta distribution.</param>
/// <returns>True when the parameters are valid, false otherwise.</returns>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double a, double b)
{
if (a < 0.0 || b < 0.0 || Double.IsNaN(a) || Double.IsNaN(b))
@ -126,8 +122,15 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double A
{
get { return _shapeA; }
set { SetParameters(value, _shapeB); }
get
{
return _shapeA;
}
set
{
SetParameters(value, _shapeB);
}
}
/// <summary>
@ -135,8 +138,15 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double B
{
get { return _shapeB; }
set { SetParameters(_shapeA, value); }
get
{
return _shapeB;
}
set
{
SetParameters(_shapeA, value);
}
}
#region IDistribution implementation
@ -169,34 +179,37 @@ namespace MathNet.Numerics.Distributions
{
get
{
if(_shapeA == 0.0 && _shapeB == 0.0)
if (_shapeA == 0.0 && _shapeB == 0.0)
{
return 0.5;
}
else if(_shapeA == 0.0)
if (_shapeA == 0.0)
{
return 0.0;
}
else if(_shapeB == 0.0)
if (_shapeB == 0.0)
{
return 1.0;
}
else if(Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
{
return 0.5;
}
else if (Double.IsPositiveInfinity(_shapeA))
if (Double.IsPositiveInfinity(_shapeA))
{
return 1.0;
}
else if (Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeB))
{
return 0.0;
}
else
{
return _shapeA / (_shapeA + _shapeB);
}
return _shapeA / (_shapeA + _shapeB);
}
}
@ -216,7 +229,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double StdDev
{
get { return Math.Sqrt((_shapeA * _shapeB) / ((_shapeA + _shapeB) * (_shapeA + _shapeB) * (_shapeA + _shapeB + 1.0))); }
get
{
return Math.Sqrt((_shapeA * _shapeB) / ((_shapeA + _shapeB) * (_shapeA + _shapeB) * (_shapeA + _shapeB + 1.0)));
}
}
/// <summary>
@ -230,21 +246,21 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (_shapeA == 0.0 && _shapeB == 0.0)
if (_shapeA == 0.0 && _shapeB == 0.0)
{
return -Math.Log(0.5);
}
else if (_shapeA == 0.0 || _shapeB == 0.0)
if (_shapeA == 0.0 || _shapeB == 0.0)
{
return 0.0;
}
else
{
return SpecialFunctions.BetaLn(_shapeA, _shapeB)
- ((_shapeA - 1.0) * SpecialFunctions.DiGamma(_shapeA))
- ((_shapeB - 1.0) * SpecialFunctions.DiGamma(_shapeB))
+ ((_shapeA + _shapeB - 2.0) * SpecialFunctions.DiGamma(_shapeA + _shapeB));
}
return SpecialFunctions.BetaLn(_shapeA, _shapeB)
- ((_shapeA - 1.0) * SpecialFunctions.DiGamma(_shapeA))
- ((_shapeB - 1.0) * SpecialFunctions.DiGamma(_shapeB))
+ ((_shapeA + _shapeB - 2.0) * SpecialFunctions.DiGamma(_shapeA + _shapeB));
}
}
@ -259,33 +275,37 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (Double.IsPositiveInfinity(_shapeA))
if (Double.IsPositiveInfinity(_shapeA))
{
return -2.0;
}
else if (Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeB))
{
return 2.0;
}
else if (_shapeA == 0.0 && _shapeB == 0.0)
if (_shapeA == 0.0 && _shapeB == 0.0)
{
return 0.0;
}
else if (_shapeA == 0.0)
if (_shapeA == 0.0)
{
return 2.0;
}
else if (_shapeB == 0.0)
if (_shapeB == 0.0)
{
return -2.0;
}
else
{
return 2.0 * (_shapeB - _shapeA) * Math.Sqrt(_shapeA + _shapeB + 1.0)
return 2.0 * (_shapeB - _shapeA) * Math.Sqrt(_shapeA + _shapeB + 1.0)
/ ((_shapeA + _shapeB + 2.0) * Math.Sqrt(_shapeA * _shapeB));
}
}
}
#endregion
#region IContinuousDistribution implementation
@ -301,34 +321,38 @@ namespace MathNet.Numerics.Distributions
{
return 0.5;
}
else if (_shapeA == 0.0)
if (_shapeA == 0.0)
{
return 0.0;
}
else if (_shapeB == 0.0)
if (_shapeB == 0.0)
{
return 1.0;
}
else if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
{
return 0.5;
}
else if (Double.IsPositiveInfinity(_shapeA))
if (Double.IsPositiveInfinity(_shapeA))
{
return 1.0;
}
else if (Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeB))
{
return 0.0;
}
else if(_shapeA == 1.0 && _shapeB == 1.0)
if (_shapeA == 1.0 && _shapeB == 1.0)
{
return 0.5;
}
else
{
return (_shapeA - 1) / (_shapeA + _shapeB - 2);
}
return (_shapeA - 1) / (_shapeA + _shapeB - 2);
}
}
@ -337,7 +361,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Median
{
get { throw new NotImplementedException(); }
get
{
throw new NotImplementedException();
}
}
/// <summary>
@ -345,7 +372,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Minimum
{
get { return 0.0; }
get
{
return 0.0;
}
}
/// <summary>
@ -353,7 +383,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Maximum
{
get { return 1.0; }
get
{
return 1.0;
}
}
/// <summary>
@ -367,81 +400,49 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
{
if (x == 0.5)
{
return Double.PositiveInfinity;
}
else
{
return 0.0;
}
return x == 0.5 ? Double.PositiveInfinity : 0.0;
}
else if (Double.IsPositiveInfinity(_shapeA))
if (Double.IsPositiveInfinity(_shapeA))
{
if (x == 1.0)
{
return Double.PositiveInfinity;
}
else
{
return 0.0;
}
return x == 1.0 ? Double.PositiveInfinity : 0.0;
}
else if (Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeB))
{
if (x == 0.0)
{
return Double.PositiveInfinity;
}
else
{
return 0.0;
}
return x == 0.0 ? Double.PositiveInfinity : 0.0;
}
else if (_shapeA == 0.0 && _shapeB == 0.0)
if (_shapeA == 0.0 && _shapeB == 0.0)
{
if (x == 0.0 || x == 1.0)
{
return Double.PositiveInfinity;
}
else
{
return 0.0;
}
return 0.0;
}
else if (_shapeA == 0.0)
if (_shapeA == 0.0)
{
if (x == 0.0)
{
return Double.PositiveInfinity;
}
else
{
return 0.0;
}
return x == 0.0 ? Double.PositiveInfinity : 0.0;
}
else if (_shapeB == 0.0)
if (_shapeB == 0.0)
{
if (x == 1.0)
{
return Double.PositiveInfinity;
}
else
{
return 0.0;
}
return x == 1.0 ? Double.PositiveInfinity : 0.0;
}
else if (_shapeA == 1.0 && _shapeB == 1.0)
if (_shapeA == 1.0 && _shapeB == 1.0)
{
return 1.0;
}
else
{
double b = SpecialFunctions.Gamma(_shapeA + _shapeB) / (SpecialFunctions.Gamma(_shapeA) * SpecialFunctions.Gamma(_shapeB));
return b * Math.Pow(x, _shapeA - 1.0) * Math.Pow(1.0 - x, _shapeB - 1.0);
}
var b = SpecialFunctions.Gamma(_shapeA + _shapeB) / (SpecialFunctions.Gamma(_shapeA) * SpecialFunctions.Gamma(_shapeB));
return b * Math.Pow(x, _shapeA - 1.0) * Math.Pow(1.0 - x, _shapeB - 1.0);
}
/// <summary>
@ -455,83 +456,52 @@ namespace MathNet.Numerics.Distributions
{
return Double.NegativeInfinity;
}
else if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
{
if (x == 0.5)
{
return Double.PositiveInfinity;
}
else
{
return Double.NegativeInfinity;
}
return x == 0.5 ? Double.PositiveInfinity : Double.NegativeInfinity;
}
else if (Double.IsPositiveInfinity(_shapeA))
if (Double.IsPositiveInfinity(_shapeA))
{
if (x == 1.0)
{
return Double.PositiveInfinity;
}
else
{
return Double.NegativeInfinity;
}
return x == 1.0 ? Double.PositiveInfinity : Double.NegativeInfinity;
}
else if (Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeB))
{
if (x == 0.0)
{
return Double.PositiveInfinity;
}
else
{
return Double.NegativeInfinity;
}
return x == 0.0 ? Double.PositiveInfinity : Double.NegativeInfinity;
}
else if (_shapeA == 0.0 && _shapeB == 0.0)
if (_shapeA == 0.0 && _shapeB == 0.0)
{
if (x == 0.0 || x == 1.0)
{
return Double.PositiveInfinity;
}
else
{
return Double.NegativeInfinity;
}
return Double.NegativeInfinity;
}
else if (_shapeA == 0.0)
if (_shapeA == 0.0)
{
if (x == 0.0)
{
return Double.PositiveInfinity;
}
else
{
return Double.NegativeInfinity;
}
return x == 0.0 ? Double.PositiveInfinity : Double.NegativeInfinity;
}
else if (_shapeB == 0.0)
if (_shapeB == 0.0)
{
if (x == 1.0)
{
return Double.PositiveInfinity;
}
else
{
return Double.NegativeInfinity;
}
return x == 1.0 ? Double.PositiveInfinity : Double.NegativeInfinity;
}
else if (_shapeA == 1.0 && _shapeB == 1.0)
if (_shapeA == 1.0 && _shapeB == 1.0)
{
return 0.0;
}
else
{
double a = SpecialFunctions.GammaLn(_shapeA + _shapeB) - SpecialFunctions.GammaLn(_shapeA) - SpecialFunctions.GammaLn(_shapeB);
double b = x == 0.0 ? (_shapeA == 1.0 ? 0.0 : Double.NegativeInfinity) : (_shapeA - 1.0) * Math.Log(x);
double c = x == 1.0 ? (_shapeB == 1.0 ? 0.0 : Double.NegativeInfinity) : (_shapeB - 1.0) * Math.Log(1.0 - x);
return a + b + c;
}
var a = SpecialFunctions.GammaLn(_shapeA + _shapeB) - SpecialFunctions.GammaLn(_shapeA) - SpecialFunctions.GammaLn(_shapeB);
var b = x == 0.0 ? (_shapeA == 1.0 ? 0.0 : Double.NegativeInfinity) : (_shapeA - 1.0) * Math.Log(x);
var c = x == 1.0 ? (_shapeB == 1.0 ? 0.0 : Double.NegativeInfinity) : (_shapeB - 1.0) * Math.Log(1.0 - x);
return a + b + c;
}
/// <summary>
@ -545,77 +515,53 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (x >= 1.0)
if (x >= 1.0)
{
return 1.0;
}
else if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeA) && Double.IsPositiveInfinity(_shapeB))
{
if (x < 0.5)
{
return 0.0;
}
else
{
return 1.0;
}
return x < 0.5 ? 0.0 : 1.0;
}
else if (Double.IsPositiveInfinity(_shapeA))
if (Double.IsPositiveInfinity(_shapeA))
{
if (x < 1.0)
{
return 0.0;
}
else
{
return 1.0;
}
return x < 1.0 ? 0.0 : 1.0;
}
else if (Double.IsPositiveInfinity(_shapeB))
if (Double.IsPositiveInfinity(_shapeB))
{
if (x >= 0.0)
{
return 1.0;
}
else
{
return 0.0;
}
return x >= 0.0 ? 1.0 : 0.0;
}
else if (_shapeA == 0.0 && _shapeB == 0.0)
if (_shapeA == 0.0 && _shapeB == 0.0)
{
if (x >= 0.0 && x < 1.0)
{
return 0.5;
}
else
{
return 1.0;
}
return 1.0;
}
else if (_shapeA == 0.0)
if (_shapeA == 0.0)
{
return 1.0;
}
else if (_shapeB == 0.0)
if (_shapeB == 0.0)
{
if (x >= 1.0)
{
return 1.0;
}
else
{
return 0.0;
}
return x >= 1.0 ? 1.0 : 0.0;
}
else if (_shapeA == 1.0 && _shapeB == 1.0)
if (_shapeA == 1.0 && _shapeB == 1.0)
{
return x;
}
else
{
return SpecialFunctions.BetaRegularized(_shapeA, _shapeB, x);
}
return SpecialFunctions.BetaRegularized(_shapeA, _shapeB, x);
}
/// <summary>
@ -638,6 +584,7 @@ namespace MathNet.Numerics.Distributions
yield return SampleBeta(RandomSource, _shapeA, _shapeB);
}
}
#endregion
/// <summary>
@ -686,8 +633,8 @@ namespace MathNet.Numerics.Distributions
/// <returns>a random number from the Beta distribution.</returns>
internal static double SampleBeta(Random rnd, double a, double b)
{
double x = Gamma.SampleGamma(rnd, a, 1.0);
double y = Gamma.SampleGamma(rnd, b, 1.0);
var x = Gamma.SampleGamma(rnd, a, 1.0);
var y = Gamma.SampleGamma(rnd, b, 1.0);
return x / (x + y);
}
}

348
src/Numerics/Distributions/Continuous/Cauchy.cs

@ -0,0 +1,348 @@
// <copyright file="Cauchy.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// The Cauchy distribution is a symmetric continuous probability distribution. For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/cauchy_distribution">Wikipedia - Cauchy distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Cauchy : IContinuousDistribution
{
/// <summary>
/// The scale of the Cauchy distribution.
/// </summary>
private double _scale;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="Cauchy"/> class with the location parameter set to 0 and the scale parameter set to 1
/// </summary>
public Cauchy() : this(0, 1)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Cauchy"/> class.
/// </summary>
/// <param name="location">
/// The location parameter for the distribution.
/// </param>
/// <param name="scale">
/// The scale parameter for the distribution.
/// </param>
/// <exception cref="ArgumentException">
/// If <paramref name="scale"/> is negative.
/// </exception>
public Cauchy(double location, double scale)
{
SetParameters(location, scale);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="location">Location parameter.</param>
/// <param name="scale">Scale parameter. Must be greater than 0.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double location, double scale)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(location, scale))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
Median = location;
_scale = scale;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="location">Location parameter.</param>
/// <param name="scale">Scale parameter. Must be greater than 0.</param>
/// <returns>True when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double location, double scale)
{
if (scale <= 0)
{
return false;
}
if (Double.IsNaN(location) || Double.IsNaN(scale))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the location parameter of the distribution.
/// </summary>
public double Location
{
get
{
return Median;
}
set
{
SetParameters(value, _scale);
}
}
/// <summary>
/// Gets or sets the scale parameter of the distribution.
/// </summary>
public double Scale
{
get
{
return _scale;
}
set
{
SetParameters(Median, value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Cauchy(Location = " + Median + ", Scale = " + _scale + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
return Math.Log(4.0 * Constants.Pi * _scale);
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return ((1.0 / Constants.Pi) * Math.Atan((x - Median) / _scale)) + 0.5;
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
return Median;
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get;
private set;
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return Double.NegativeInfinity;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
return 1.0 / (Constants.Pi * _scale * (1.0 + (((x - Median) / _scale) * ((x - Median) / _scale))));
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return -Math.Log(Constants.Pi * _scale * (1.0 + (((x - Median) / _scale) * ((x - Median) / _scale))));
}
/// <summary>
/// Draws a random sample from the distribution.
/// </summary>
/// <returns>A random number from this distribution.</returns>
public double Sample()
{
return DoSample(RandomSource, Median, _scale);
}
/// <summary>
/// Generates a sequence of samples from the Cauchy distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource, Median, _scale);
}
}
#endregion
/// <summary>
/// Samples the distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="location">The location shape parameter.</param>
/// <param name="scale">The scale parameter.</param>
/// <returns>a random number from the distribution.</returns>
private static double DoSample(Random rnd, double location, double scale)
{
var u = rnd.NextDouble();
return location + (scale * Math.Tan(Constants.Pi * (u - 0.5)));
}
}
}

326
src/Numerics/Distributions/Continuous/Chi.cs

@ -0,0 +1,326 @@
// <copyright file="Chi.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// This class implements functionality for the Chi distribution. This distribution is
/// a continuous probability distribution. The distribution usually arises when a k-dimensional vector's orthogonal
/// components are independent and each follow a standard normal distribution. The length of the vector will
/// then have a chi distribution.
/// <a href="http://en.wikipedia.org/wiki/Chi_distribution">Wikipedia - Chi distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Chi : IContinuousDistribution
{
/// <summary>
/// Keeps track of the degrees of freedom for the Chi distribution.
/// </summary>
private double _dof;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="Chi"/> class.
/// </summary>
/// <param name="dof">
/// The degrees of freedom for the Chi distribution.
/// </param>
public Chi(double dof)
{
SetParameters(dof);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="dof">The degrees of freedom for the Chi distribution.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double dof)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(dof))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_dof = dof;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="dof">The degrees of freedom for the Chi distribution.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double dof)
{
if (dof <= 0 || Double.IsNaN(dof))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the degrees of freedom of the Chi distribution.
/// </summary>
public double DegreesOfFreedom
{
get
{
return _dof;
}
set
{
SetParameters(value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Chi(DoF = " + _dof + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the distribution's random number generator.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
return Math.Sqrt(2) * (SpecialFunctions.Gamma((_dof + 1.0) / 2.0) / SpecialFunctions.Gamma(_dof / 2.0));
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
return _dof - (Mean * Mean);
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
return Math.Sqrt(Variance);
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
return SpecialFunctions.GammaLn(_dof / 2.0) + ((_dof - Math.Log(2) - ((_dof - 1.0) * SpecialFunctions.DiGamma(_dof / 2.0))) / 2.0);
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
var sigma = StdDev;
return (Mean * (1.0 - (2.0 * (sigma * sigma)))) / (sigma * sigma * sigma);
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return SpecialFunctions.GammaLowerIncomplete(_dof / 2.0, x * x / 2.0) / SpecialFunctions.Gamma(_dof / 2.0);
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
if (_dof < 1)
{
throw new NotSupportedException();
}
return Math.Sqrt(_dof - 1.0);
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return 0.0;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
return (Math.Pow(2.0, 1.0 - (_dof / 2.0)) * Math.Pow(x, _dof - 1.0) * Math.Exp(-x * x / 2.0)) / SpecialFunctions.Gamma(_dof / 2.0);
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return ((1.0 - (_dof / 2.0)) * Math.Log(2.0)) + ((_dof - 1.0) * Math.Log(x)) - (x * x / 2.0) - SpecialFunctions.GammaLn(_dof / 2.0);
}
/// <summary>
/// Generates a sample from the Chi distribution.
/// </summary>
/// <returns>a sample from the distribution.</returns>
public double Sample()
{
return DoSample(RandomSource);
}
/// <summary>
/// Generates a sequence of samples from the Chi distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource);
}
}
#endregion
/// <summary>
/// Samples the distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <returns>a random number from the distribution.</returns>
private double DoSample(Random rnd)
{
double sum = 0;
var n = (int)_dof;
for (var i = 0; i < n; i++)
{
sum += Normal.Sample(rnd, 0.0, 1.0);
}
return Math.Sqrt(sum);
}
}
}

303
src/Numerics/Distributions/Continuous/ChiSquare.cs

@ -0,0 +1,303 @@
// <copyright file="ChiSquare.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2010 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// This class implements functionality for the ChiSquare distribution. This distribution is
/// a sum of the squares of k independent standard normal random variables.
/// <a href="http://en.wikipedia.org/wiki/Chi-square_distribution">Wikipedia - ChiSquare distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class ChiSquare : IContinuousDistribution
{
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="ChiSquare"/> class.
/// </summary>
/// <param name="dof">
/// The degrees of freedom for the ChiSquare distribution.
/// </param>
public ChiSquare(double dof)
{
SetParameters(dof);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="dof">The degrees of freedom for the <c>ChiSquare</c> distribution.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double dof)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(dof))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
Mean = dof;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="dof">The degrees of freedom for the <c>ChiSquare</c> distribution.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double dof)
{
return dof > 0 && !Double.IsNaN(dof);
}
/// <summary>
/// Gets or sets the degrees of freedom of the <c>ChiSquare</c> distribution.
/// </summary>
public double DegreesOfFreedom
{
get
{
return Mean;
}
set
{
SetParameters(value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "ChiSquare(DoF = " + Mean + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the distribution's random number generator.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get;
private set;
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get { return 2.0 * Mean; }
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get { return Math.Sqrt(2.0 * Mean); }
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get { return (Mean / 2.0) + Math.Log(2.0 * SpecialFunctions.Gamma(Mean / 2.0)) + ((1.0 - (Mean / 2.0)) * SpecialFunctions.DiGamma(Mean / 2.0)); }
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get { return Math.Sqrt(8.0 / Mean); }
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return SpecialFunctions.GammaUpperIncomplete(Mean / 2.0, x / 2.0) / SpecialFunctions.Gamma(Mean / 2.0);
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get { return Mean - 2.0; }
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get { return Mean - (2.0 / 3.0); }
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get { return 0.0; }
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get { return double.PositiveInfinity; }
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
return (Math.Pow(x, (Mean / 2.0) - 1.0) * Math.Exp(-x / 2.0)) / (Math.Pow(2.0, Mean / 2.0) * SpecialFunctions.Gamma(Mean / 2.0));
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return (-x / 2.0) + (((Mean / 2.0) - 1.0) * Math.Log(x)) - ((Mean / 2.0) * Math.Log(2)) - SpecialFunctions.GammaLn(Mean / 2.0);
}
/// <summary>
/// Generates a sample from the <c>ChiSquare</c> distribution.
/// </summary>
/// <returns>a sample from the distribution.</returns>
public double Sample()
{
return DoSample(RandomSource, Mean);
}
/// <summary>
/// Generates a sequence of samples from the <c>ChiSquare</c> distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource, Mean);
}
}
#endregion
/// <summary>
/// Samples the distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="dof">The degrees of freedom.</param>
/// <returns>a random number from the distribution.</returns>
private static double DoSample(Random rnd, double dof)
{
double sum = 0;
var n = (int)dof;
for (var i = 0; i < n; i++)
{
sum += Normal.Sample(rnd, 0.0, 1.0);
}
return sum;
}
/// <summary>
/// Generates a sample from the <c>ChiSquare</c> distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="dof">The degrees of freedom.</param>
/// <returns>a sample from the distribution. </returns>
public static double Sample(Random rnd, double dof)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(dof))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
return DoSample(rnd, dof);
}
}
}

14
src/Numerics/Distributions/Continuous/ContinuousUniform.cs

@ -42,7 +42,7 @@ namespace MathNet.Numerics.Distributions
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to false, all parameter checks can be turned off.</para></remarks>
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class ContinuousUniform : IContinuousDistribution
{
/// <summary>
@ -93,7 +93,7 @@ namespace MathNet.Numerics.Distributions
/// </summary>
/// <param name="lower">Lower bound.</param>
/// <param name="upper">Upper bound; must be at least as large as <paramref name="lower"/>.</param>
/// <returns>True when the parameters are valid, false otherwise.</returns>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double lower, double upper)
{
if (upper < lower)
@ -310,7 +310,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Generates a sample from the ContinuousUniform distribution.
/// Generates a sample from the <c>ContinuousUniform</c> distribution.
/// </summary>
/// <returns>a sample from the distribution.</returns>
public double Sample()
@ -319,7 +319,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Generates a sequence of samples from the ContinuousUniform distribution.
/// Generates a sequence of samples from the <c>ContinuousUniform</c> distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
@ -333,7 +333,7 @@ namespace MathNet.Numerics.Distributions
#endregion
/// <summary>
/// Generates a sample from the ContinuousUniform distribution.
/// Generates a sample from the <c>ContinuousUniform</c> distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="lower">The lower bound of the uniform random variable.</param>
@ -350,7 +350,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Generates a sequence of samples from the ContinuousUniform distribution.
/// Generates a sequence of samples from the <c>ContinuousUniform</c> distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="lower">The lower bound of the uniform random variable.</param>
@ -370,7 +370,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Generates one sample from the ContinuousUniform distribution without parameter checking.
/// Generates one sample from the <c>ContinuousUniform</c> distribution without parameter checking.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="lower">The lower bound of the uniform random variable.</param>

534
src/Numerics/Distributions/Continuous/Erlang.cs

@ -0,0 +1,534 @@
// <copyright file="Erlang.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// This class implements functionality for the Erlang distribution. This distribution is
/// is a continuous probability distribution with wide applicability primarily due to its
/// relation to the exponential and Gamma distributions.
/// <a href="http://en.wikipedia.org/wiki/Erlang_distribution">Wikipedia - Erlang distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Erlang : IContinuousDistribution
{
/// <summary>
/// Erlang shape parameter.
/// </summary>
private double _shape;
/// <summary>
/// Erlang inverse scale parameter.
/// </summary>
private double _invScale;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="Erlang"/> class.
/// </summary>
/// <param name="shape">
/// The shape of the Erlang distribution.
/// </param>
/// <param name="invScale">
/// The inverse scale of the Erlang distribution.
/// </param>
public Erlang(int shape, double invScale)
{
SetParameters(shape, invScale);
RandomSource = new Random();
}
/// <summary>
/// Constructs a Erlang distribution from a shape and scale parameter. The distribution will
/// be initialized with the default <seealso cref="System.Random"/> random number generator.
/// </summary>
/// <param name="shape">The shape of the Erlang distribution.</param>
/// <param name="scale">The scale of the Erlang distribution.</param>
/// <returns>a normal distribution.</returns>
public static Erlang WithShapeScale(int shape, double scale)
{
return new Erlang(shape, 1.0 / scale);
}
/// <summary>
/// Constructs a Erlang distribution from a shape and inverse scale parameter. The distribution will
/// be initialized with the default <seealso cref="System.Random"/> random number generator.
/// </summary>
/// <param name="shape">The shape of the Erlang distribution.</param>
/// <param name="invScale">The inverse scale of the Erlang distribution.</param>
/// <returns>a normal distribution.</returns>
public static Erlang WithShapeInvScale(int shape, double invScale)
{
return new Erlang(shape, invScale);
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="shape">The shape of the Erlang distribution.</param>
/// <param name="invScale">The inverse scale of the Erlang distribution.</param>
private void SetParameters(double shape, double invScale)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(shape, invScale))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_shape = shape;
_invScale = invScale;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="shape">The shape of the Erlang distribution.</param>
/// <param name="invScale">The inverse scale of the Erlang distribution.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double shape, double invScale)
{
if (shape < 0.0 || invScale < 0.0 || Double.IsNaN(shape) || Double.IsNaN(invScale))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the shape of the Erlang distribution.
/// </summary>
public int Shape
{
get
{
return (int)_shape;
}
set
{
SetParameters(value, _invScale);
}
}
/// <summary>
/// Gets or sets the scale of the Erlang distribution.
/// </summary>
public double Scale
{
get
{
return 1.0 / _invScale;
}
set
{
var invScale = 1.0 / value;
if (Double.IsNegativeInfinity(invScale))
{
invScale = -invScale;
}
SetParameters(_shape, invScale);
}
}
/// <summary>
/// Gets or sets the inverse scale of the Erlang distribution.
/// </summary>
public double InvScale
{
get
{
return _invScale;
}
set
{
SetParameters(_shape, value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Erlang(Shape = " + _shape + ", Inverse Scale = " + _invScale + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
if (Double.IsPositiveInfinity(_invScale))
{
return _shape;
}
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
return _shape / _invScale;
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
if (Double.IsPositiveInfinity(_invScale))
{
return 0.0;
}
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
return _shape / (_invScale * _invScale);
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
if (Double.IsPositiveInfinity(_invScale))
{
return 0.0;
}
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
return Math.Sqrt(_shape) / _invScale;
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
if (Double.IsPositiveInfinity(_invScale))
{
return 0.0;
}
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
return _shape - Math.Log(_invScale) + SpecialFunctions.GammaLn(_shape) + ((1.0 - _shape) * SpecialFunctions.DiGamma(_shape));
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
if (Double.IsPositiveInfinity(_invScale))
{
return 0.0;
}
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
return 2.0 / Math.Sqrt(_shape);
}
}
/// <summary>
/// Computes the cumulative distribution function of the Erlang distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
if (Double.IsPositiveInfinity(_invScale))
{
return x >= _shape ? 1.0 : 0.0;
}
if (_shape == 0.0 && _invScale == 0.0)
{
return 0.0;
}
return SpecialFunctions.GammaLowerRegularized(_shape, x * _invScale);
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
if (_shape < 1)
{
throw new NotSupportedException();
}
if (Double.IsPositiveInfinity(_invScale))
{
return _shape;
}
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
return (_shape - 1.0) / _invScale;
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the minimum value.
/// </summary>
public double Minimum
{
get
{
return 0.0;
}
}
/// <summary>
/// Gets the Maximum value.
/// </summary>
public double Maximum
{
get
{
return double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
if (Double.IsPositiveInfinity(_invScale))
{
return x == _shape ? Double.PositiveInfinity : 0.0;
}
if (_shape == 0.0 && _invScale == 0.0)
{
return 0.0;
}
if (_shape == 1.0)
{
return _invScale * Math.Exp(-_invScale * x);
}
return Math.Pow(_invScale, _shape) * Math.Pow(x, _shape - 1.0) * Math.Exp(-_invScale * x) / SpecialFunctions.Gamma(_shape);
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
if (Double.IsPositiveInfinity(_invScale))
{
return x == _shape ? Double.PositiveInfinity : Double.NegativeInfinity;
}
if (_shape == 0.0 && _invScale == 0.0)
{
return Double.NegativeInfinity;
}
if (_shape == 1.0)
{
return Math.Log(_invScale) - (_invScale * x);
}
return (_shape * Math.Log(_invScale)) + ((_shape - 1.0) * Math.Log(x)) - (_invScale * x) - SpecialFunctions.GammaLn(_shape);
}
/// <summary>
/// Generates a sample from the Erlang distribution.
/// </summary>
/// <returns>a sample from the distribution.</returns>
public double Sample()
{
return DoSample(RandomSource, _shape, _invScale);
}
/// <summary>
/// Generates a sequence of samples from the Erlang distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource, _shape, _invScale);
}
}
#endregion
/// <summary>
/// <para>Sampling implementation based on:
/// "A Simple Method for Generating Erlang Variables" - Marsaglia &amp; Tsang
/// ACM Transactions on Mathematical Software, Vol. 26, No. 3, September 2000, Pages 363–372.</para>
/// <para>This method performs no parameter checks.</para>
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="shape">The shape of the Gamma distribution.</param>
/// <param name="invScale">The inverse scale of the Gamma distribution.</param>
/// <returns>A sample from a Erlang distributed random variable.</returns>
private static double DoSample(Random rnd, double shape, double invScale)
{
if (Double.IsPositiveInfinity(invScale))
{
return shape;
}
var a = shape;
var alphafix = 1.0;
// Fix when alpha is less than one.
if (shape < 1.0)
{
a = shape + 1.0;
alphafix = Math.Pow(rnd.NextDouble(), 1.0 / shape);
}
var d = a - (1.0 / 3.0);
var c = 1.0 / Math.Sqrt(9.0 * d);
while (true)
{
var x = Normal.Sample(rnd, 0.0, 1.0);
var v = 1.0 + (c * x);
while (v <= 0.0)
{
x = Normal.Sample(rnd, 0.0, 1.0);
v = 1.0 + (c * x);
}
v = v * v * v;
var u = rnd.NextDouble();
x = x * x;
if (u < 1.0 - (0.0331 * x * x))
{
return alphafix * d * v / invScale;
}
if (Math.Log(u) < (0.5 * x) + (d * (1.0 - v + Math.Log(v))))
{
return alphafix * d * v / invScale;
}
}
}
}
}

332
src/Numerics/Distributions/Continuous/Exponential.cs

@ -0,0 +1,332 @@
// <copyright file="Exponential.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// The exponential distribution is a distribution over the real numbers parameterized by one non-negative parameter.
/// <a href="http://en.wikipedia.org/wiki/exponential_distribution">Wikipedia - exponential distribution</a>.
/// </summary>
/// <remarks>The distribution will use the <see cref="System.Random"/> by default.
/// <para>Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Exponential : IContinuousDistribution
{
/// <summary>
/// The lambda parameter of the Exponential distribution.
/// </summary>
private double _lambda;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="Exponential"/> class.
/// </summary>
/// <param name="lambda">
/// The lambda parameter of the Exponential distribution.
/// </param>
public Exponential(double lambda)
{
SetParameters(lambda);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="lambda">Lambda parameter.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double lambda)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(lambda))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_lambda = lambda;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="lambda">Lambda parameter.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double lambda)
{
if (lambda < 0)
{
return false;
}
if (Double.IsNaN(lambda))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the lambda parameter of the distribution.
/// </summary>
public double Lambda
{
get
{
return _lambda;
}
set
{
SetParameters(value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Exponential(Lambda = " + _lambda + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
return 1.0 / _lambda;
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
return 1.0 / (_lambda * _lambda);
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
return 1.0 / _lambda;
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
return 1.0 - Math.Log(_lambda);
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
return 2.0;
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
if (x >= 0.0)
{
return 1.0 - Math.Exp(-_lambda * x);
}
return 0.0;
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
return 0.0;
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get
{
return Math.Log(2.0) / _lambda;
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return 0.0;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
if (x >= 0.0)
{
return _lambda * Math.Exp(-_lambda * x);
}
return 0.0;
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return Math.Log(_lambda) - (_lambda * x);
}
/// <summary>
/// Draws a random sample from the distribution.
/// </summary>
/// <returns>A random number from this distribution.</returns>
public double Sample()
{
return DoSample(RandomSource, _lambda);
}
/// <summary>
/// Generates a sequence of samples from the Exponential distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource, _lambda);
}
}
#endregion
/// <summary>
/// Samples the distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="lambda">The lambda parameter of the Exponential distribution.</param>
/// <returns>a random number from the distribution.</returns>
private static double DoSample(Random rnd, double lambda)
{
var r = rnd.NextDouble();
while (r == 0.0)
{
r = rnd.NextDouble();
}
return -Math.Log(r) / lambda;
}
}
}

363
src/Numerics/Distributions/Continuous/FisherSnedecor.cs

@ -0,0 +1,363 @@
// <copyright file="FisherSnedecor.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// Implements the FisherSnedecor distribution. For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/F-distribution">Wikipedia - FisherSnedecor distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class FisherSnedecor : IContinuousDistribution
{
/// <summary>
/// The first parameter - degree of freedom.
/// </summary>
private double _d1;
/// <summary>
/// The second parameter - degree of freedom.
/// </summary>
private double _d2;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="FisherSnedecor"/> class.
/// </summary>
/// <param name="d1">
/// The first parameter - degree of freedom.
/// </param>
/// <param name="d2">
/// The second parameter - degree of freedom.
/// </param>
public FisherSnedecor(double d1, double d2)
{
SetParameters(d1, d2);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="d1">The first parameter - degree of freedom.</param>
/// <param name="d2">The second parameter - degree of freedom.</param>
private void SetParameters(double d1, double d2)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(d1, d2))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_d1 = d1;
_d2 = d2;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="d1">The first parameter - degree of freedom.</param>
/// <param name="d2">The second parameter - degree of freedom.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double d1, double d2)
{
if (d1 <= 0 || d2 <= 0)
{
return false;
}
if (Double.IsNaN(d1) || Double.IsNaN(d2))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the first parameter - degree of freedom.
/// </summary>
public double DegreeOfFreedom1
{
get
{
return _d1;
}
set
{
SetParameters(value, _d2);
}
}
/// <summary>
/// Gets or sets the second parameter - degree of freedom.
/// </summary>
public double DegreeOfFreedom2
{
get
{
return _d2;
}
set
{
SetParameters(_d1, value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "FisherSnedecor(DegreeOfFreedom1 = " + _d1 + ", DegreeOfFreedom2 = " + _d2 + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the distribution's random number generator.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException(Resources.InvalidDistributionParameters);
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
if (_d2 <= 2)
{
throw new NotSupportedException();
}
return _d2 / (_d2 - 2.0);
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
if (_d2 <= 4)
{
throw new NotSupportedException();
}
return (2.0 * _d2 * _d2 * (_d1 + _d2 - 2.0)) / (_d1 * (_d2 - 2.0) * (_d2 - 2.0) * (_d2 - 4.0));
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
return Math.Sqrt(Variance);
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
if (_d2 <= 6)
{
throw new NotSupportedException();
}
return (((2.0 * _d1) + _d2 - 2.0) * Math.Sqrt(8.0 * (_d2 - 4.0))) / ((_d2 - 6.0) * Math.Sqrt(_d1 * (_d1 + _d2 - 2.0)));
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return SpecialFunctions.BetaRegularized(_d1 / 2.0, _d2 / 2.0, _d1 * _d2 / (_d1 + (_d1 * _d2)));
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
if (_d1 <= 2)
{
throw new NotSupportedException();
}
return (_d2 * (_d1 - 2.0)) / (_d1 * (_d2 + 2.0));
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return 0.0;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
return Math.Sqrt(Math.Pow(_d1 * x, _d1) * Math.Pow(_d2, _d2) / Math.Pow((_d1 * x) + _d2, _d1 + _d2)) / (x * SpecialFunctions.Beta(_d1 / 2.0, _d2 / 2.0));
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return Math.Log(Density(x));
}
/// <summary>
/// Generates a sample from the <c>FisherSnedecor</c> distribution.
/// </summary>
/// <returns>a sample from the distribution.</returns>
public double Sample()
{
return DoSample(RandomSource, _d1, _d2);
}
/// <summary>
/// Generates a sequence of samples from the <c>FisherSnedecor</c> distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource, _d1, _d2);
}
}
#endregion
/// <summary>
/// Generates one sample from the <c>FisherSnedecor</c> distribution without parameter checking.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="d1">The first parameter - degree of freedom.</param>
/// <param name="d2">The second parameter - degree of freedom.</param>
/// <returns>a <c>FisherSnedecor</c> distributed random number.</returns>
private static double DoSample(Random rnd, double d1, double d2)
{
return (ChiSquare.Sample(rnd, d1) / d1) / (ChiSquare.Sample(rnd, d2) / d2);
}
}
}

209
src/Numerics/Distributions/Continuous/Gamma.cs

@ -3,9 +3,7 @@
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2010 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
@ -14,10 +12,8 @@
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -50,7 +46,7 @@ namespace MathNet.Numerics.Distributions
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to false, all parameter checks can be turned off.</para></remarks>
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Gamma : IContinuousDistribution
{
/// <summary>
@ -88,7 +84,7 @@ namespace MathNet.Numerics.Distributions
/// <returns>a normal distribution.</returns>
public static Gamma WithShapeScale(double shape, double scale)
{
return new Gamma(shape, 1.0/scale);
return new Gamma(shape, 1.0 / scale);
}
/// <summary>
@ -117,7 +113,7 @@ namespace MathNet.Numerics.Distributions
/// </summary>
/// <param name="shape">The shape of the Gamma distribution.</param>
/// <param name="invScale">The inverse scale of the Gamma distribution.</param>
/// <returns>True when the parameters are valid, false otherwise.</returns>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double shape, double invScale)
{
if (shape < 0.0 || invScale < 0.0 || Double.IsNaN(shape) || Double.IsNaN(invScale))
@ -173,11 +169,11 @@ namespace MathNet.Numerics.Distributions
set
{
double invScale = 1.0/value;
var invScale = 1.0 / value;
if(Double.IsNegativeInfinity(invScale))
if (Double.IsNegativeInfinity(invScale))
{
invScale = - invScale;
invScale = -invScale;
}
SetParameters(_shape, invScale);
@ -234,14 +230,13 @@ namespace MathNet.Numerics.Distributions
{
return _shape;
}
else if(_invScale == 0.0 && _shape == 0.0)
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
else
{
return _shape / _invScale;
}
return _shape / _invScale;
}
}
@ -256,14 +251,13 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (_invScale == 0.0 && _shape == 0.0)
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
else
{
return _shape / (_invScale * _invScale);
}
return _shape / (_invScale * _invScale);
}
}
@ -278,14 +272,13 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (_invScale == 0.0 && _shape == 0.0)
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
else
{
return Math.Sqrt(_shape / (_invScale * _invScale));
}
return Math.Sqrt(_shape / (_invScale * _invScale));
}
}
@ -300,14 +293,13 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (_invScale == 0.0 && _shape == 0.0)
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
else
{
return _shape - Math.Log(_invScale) + SpecialFunctions.GammaLn(_shape) + ((1.0 - _shape) * SpecialFunctions.DiGamma(_shape));
}
return _shape - Math.Log(_invScale) + SpecialFunctions.GammaLn(_shape) + ((1.0 - _shape) * SpecialFunctions.DiGamma(_shape));
}
}
@ -322,16 +314,16 @@ namespace MathNet.Numerics.Distributions
{
return 0.0;
}
else if (_invScale == 0.0 && _shape == 0.0)
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
else
{
return 2.0 / Math.Sqrt(_shape);
}
return 2.0 / Math.Sqrt(_shape);
}
}
#endregion
#region IContinuousDistribution implementation
@ -347,14 +339,13 @@ namespace MathNet.Numerics.Distributions
{
return _shape;
}
else if (_invScale == 0.0 && _shape == 0.0)
if (_invScale == 0.0 && _shape == 0.0)
{
return Double.NaN;
}
else
{
return (_shape - 1.0) / _invScale;
}
return (_shape - 1.0) / _invScale;
}
}
@ -363,7 +354,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Median
{
get { throw new NotSupportedException(); }
get
{
throw new NotSupportedException();
}
}
/// <summary>
@ -371,7 +365,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Minimum
{
get { return 0.0; }
get
{
return 0.0;
}
}
/// <summary>
@ -379,7 +376,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Maximum
{
get { return Double.PositiveInfinity; }
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
@ -391,27 +391,20 @@ namespace MathNet.Numerics.Distributions
{
if (Double.IsPositiveInfinity(_invScale))
{
if (x == _shape)
{
return Double.PositiveInfinity;
}
else
{
return 0.0;
}
return x == _shape ? Double.PositiveInfinity : 0.0;
}
else if (_shape == 0.0 && _invScale == 0.0)
if (_shape == 0.0 && _invScale == 0.0)
{
return 0.0;
}
else if (_shape == 1.0)
if (_shape == 1.0)
{
return _invScale * Math.Exp(- _invScale * x);
return _invScale * Math.Exp(-_invScale * x);
}
else
{
return Math.Pow(_invScale, _shape) * Math.Pow(x, _shape - 1.0) * Math.Exp(-_invScale * x) / SpecialFunctions.Gamma(_shape);
}
return Math.Pow(_invScale, _shape) * Math.Pow(x, _shape - 1.0) * Math.Exp(-_invScale * x) / SpecialFunctions.Gamma(_shape);
}
/// <summary>
@ -423,27 +416,20 @@ namespace MathNet.Numerics.Distributions
{
if (Double.IsPositiveInfinity(_invScale))
{
if (x == _shape)
{
return Double.PositiveInfinity;
}
else
{
return Double.NegativeInfinity;
}
return x == _shape ? Double.PositiveInfinity : Double.NegativeInfinity;
}
else if(_shape == 0.0 && _invScale == 0.0)
if (_shape == 0.0 && _invScale == 0.0)
{
return Double.NegativeInfinity;
}
else if(_shape == 1.0)
if (_shape == 1.0)
{
return Math.Log(_invScale) - (_invScale * x);
}
else
{
return (_shape * Math.Log(_invScale)) + ((_shape - 1.0) * Math.Log(x)) - (_invScale * x) - SpecialFunctions.GammaLn(_shape);
}
return (_shape * Math.Log(_invScale)) + ((_shape - 1.0) * Math.Log(x)) - (_invScale * x) - SpecialFunctions.GammaLn(_shape);
}
/// <summary>
@ -455,23 +441,15 @@ namespace MathNet.Numerics.Distributions
{
if (Double.IsPositiveInfinity(_invScale))
{
if (x >= _shape)
{
return 1.0;
}
else
{
return 0.0;
}
return x >= _shape ? 1.0 : 0.0;
}
else if (_shape == 0.0 && _invScale == 0.0)
if (_shape == 0.0 && _invScale == 0.0)
{
return 0.0;
}
else
{
return SpecialFunctions.GammaLowerRegularized(_shape, x * _invScale);
}
return SpecialFunctions.GammaLowerRegularized(_shape, x * _invScale);
}
/// <summary>
@ -494,6 +472,7 @@ namespace MathNet.Numerics.Distributions
yield return SampleGamma(RandomSource, _shape, _invScale);
}
}
#endregion
/// <summary>
@ -543,48 +522,46 @@ namespace MathNet.Numerics.Distributions
/// <param name="shape">The shape of the Gamma distribution.</param>
/// <param name="invScale">The inverse scale of the Gamma distribution.</param>
/// <returns>A sample from a Gamma distributed random variable.</returns>
internal static double SampleGamma(System.Random rnd, double shape, double invScale)
internal static double SampleGamma(Random rnd, double shape, double invScale)
{
if (Double.IsPositiveInfinity(invScale))
{
return shape;
}
else
var a = shape;
var alphafix = 1.0;
// Fix when alpha is less than one.
if (shape < 1.0)
{
a = shape + 1.0;
alphafix = Math.Pow(rnd.NextDouble(), 1.0 / shape);
}
var d = a - (1.0 / 3.0);
var c = 1.0 / Math.Sqrt(9.0 * d);
while (true)
{
double a = shape;
double alphafix = 1.0;
var x = Normal.Sample(rnd, 0.0, 1.0);
var v = 1.0 + (c * x);
while (v <= 0.0)
{
x = Normal.Sample(rnd, 0.0, 1.0);
v = 1.0 + (c * x);
}
// Fix when alpha is less than one.
if (shape < 1.0)
v = v * v * v;
var u = rnd.NextDouble();
x = x * x;
if (u < 1.0 - (0.0331 * x * x))
{
a = shape + 1.0;
alphafix = System.Math.Pow(rnd.NextDouble(), 1.0 / shape);
return alphafix * d * v / invScale;
}
double d = a - (1.0 / 3.0);
double c = 1.0 / System.Math.Sqrt(9.0 * d);
while (true)
if (Math.Log(u) < (0.5 * x) + (d * (1.0 - v + Math.Log(v))))
{
double x = Normal.Sample(rnd, 0.0, 1.0);
double v = 1.0 + (c * x);
while (v <= 0.0)
{
x = Normal.Sample(rnd, 0.0, 1.0);
v = 1.0 + (c * x);
}
v = v * v * v;
double u = rnd.NextDouble();
x = x * x;
if (u < 1.0 - (0.0331 * x * x))
{
return alphafix * d * v / invScale;
}
if (System.Math.Log(u) < (0.5 * x) + (d * (1.0 - v + System.Math.Log(v))))
{
return alphafix * d * v / invScale;
}
return alphafix * d * v / invScale;
}
}
}

378
src/Numerics/Distributions/Continuous/InverseGamma.cs

@ -0,0 +1,378 @@
// <copyright file="InverseGamma.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// The inverse Gamma distribution is a distribution over the positive real numbers parameterized by
/// two positive parameters.
/// <a href="http://en.wikipedia.org/wiki/inverse-gamma_distribution">Wikipedia - InverseGamma distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class InverseGamma : IContinuousDistribution
{
/// <summary>
/// Inverse Gamma shape parameter.
/// </summary>
private double _shape;
/// <summary>
/// Inverse Gamma scale parameter scale.
/// </summary>
private double _scale;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="InverseGamma"/> class.
/// </summary>
/// <param name="shape">
/// The shape (alpha) parameter of the inverse Gamma distribution.
/// </param>
/// <param name="scale">
/// The scale (beta) parameter of the inverse Gamma distribution.
/// </param>
public InverseGamma(double shape, double scale)
{
SetParameters(shape, scale);
_random = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="shape">
/// The shape (alpha) parameter of the inverse Gamma distribution.
/// </param>
/// <param name="scale">
/// The scale (beta) parameter of the inverse Gamma distribution.
/// </param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double shape, double scale)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(shape, scale))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_shape = shape;
_scale = scale;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="shape">
/// The shape (alpha) parameter of the inverse Gamma distribution.
/// </param>
/// <param name="scale">
/// The scale (beta) parameter of the inverse Gamma distribution.
/// </param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double shape, double scale)
{
if (shape <= 0 || scale <= 0)
{
return false;
}
if (Double.IsNaN(shape) || Double.IsNaN(scale))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the shape (alpha) parameter.
/// </summary>
public double Shape
{
get
{
return _shape;
}
set
{
SetParameters(value, _scale);
}
}
/// <summary>
/// Gets or sets The scale (beta) parameter.
/// </summary>
public double Scale
{
get
{
return _scale;
}
set
{
SetParameters(_shape, value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "InverseGamma(Shape = " + _shape + ", Inverse Scale = " + _scale + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
if (_shape <= 1)
{
throw new NotSupportedException();
}
return _scale / (_shape - 1.0);
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
if (_shape <= 2)
{
throw new NotSupportedException();
}
return _scale * _scale / ((_shape - 1.0) * (_shape - 1.0) * (_shape - 2.0));
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
return _scale / (Math.Abs(_shape - 1.0) * Math.Sqrt(_shape - 2.0));
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
return _shape + Math.Log(_scale) + SpecialFunctions.GammaLn(_shape) - ((1 + _shape) * SpecialFunctions.DiGamma(_shape));
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
if (_shape <= 3)
{
throw new NotSupportedException();
}
return (4 * Math.Sqrt(_shape - 2)) / (_shape - 3);
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return SpecialFunctions.GammaLowerIncomplete(_shape, _scale / x);
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
return _scale / (_shape + 1.0);
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
/// <remarks>Throws <see cref="NotImplementedException"/>.</remarks>
public double Median
{
get
{
throw new NotImplementedException();
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return 0.0;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
if (x >= 0.0)
{
return Math.Pow(_scale, _shape) * Math.Pow(x, -_shape - 1.0) * Math.Exp(-_scale / x) / SpecialFunctions.Gamma(_shape);
}
return 0.0;
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return Math.Log(Density(x));
}
/// <summary>
/// Draws a random sample from the distribution.
/// </summary>
/// <returns>A random number from this distribution.</returns>
public double Sample()
{
return DoSample(RandomSource, _shape, _scale);
}
/// <summary>
/// Generates a sequence of samples from the Cauchy distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource, _shape, _scale);
}
}
#endregion
/// <summary>
/// Samples the distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="shape">
/// The shape (alpha) parameter of the inverse Gamma distribution.
/// </param>
/// <param name="scale">
/// The scale (beta) parameter of the inverse Gamma distribution.
/// </param>
/// <returns>a random number from the distribution.</returns>
private static double DoSample(Random rnd, double shape, double scale)
{
return 1.0 / Gamma.Sample(rnd, shape, scale);
}
}
}

350
src/Numerics/Distributions/Continuous/Laplace.cs

@ -0,0 +1,350 @@
// <copyright file="Laplace.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// The Laplace distribution is a distribution over the real numbers parameterized by a mean and
/// scale parameter. The PDF is:
/// p(x) = \frac{1}{2 * scale} \exp{- |x - mean| / scale}.
/// <a href="http://en.wikipedia.org/wiki/Laplace_distribution">Wikipedia - Laplace distribution</a>.
/// </summary>
/// <remarks>The distribution will use the <see cref="System.Random"/> by default.
/// <para>Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Laplace : IContinuousDistribution
{
/// <summary>
/// The scale of the Laplace distribution.
/// </summary>
private double _scale;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Gets or sets the location of the Laplace distribution.
/// </summary>
public double Location
{
get
{
return Mean;
}
set
{
SetParameters(value, _scale);
}
}
/// <summary>
/// Gets or sets the scale of the Laplace distribution.
/// </summary>
public double Scale
{
get
{
return _scale;
}
set
{
SetParameters(Mean, value);
}
}
/// <summary>
/// Initializes a new instance of the <see cref="Laplace"/> class (location = 0, scale = 1).
/// </summary>
public Laplace() : this(0.0, 1.0)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Laplace"/> class.
/// </summary>
/// <param name="location">
/// The location for the Laplace distribution.
/// </param>
/// <param name="scale">
/// The scale for the Laplace distribution.
/// </param>
/// <exception cref="ArgumentException">
/// If <paramref name="scale"/> is negative.
/// </exception>
public Laplace(double location, double scale)
{
SetParameters(location, scale);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="location">The location for the Laplace distribution.</param>
/// <param name="scale">The scale for the Laplace distribution.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double location, double scale)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(location, scale))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
Mean = location;
_scale = scale;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="location">The location for the Laplace distribution.</param>
/// <param name="scale">The scale for the Laplace distribution.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double location, double scale)
{
if (scale <= 0)
{
return false;
}
if (Double.IsNaN(location) || Double.IsNaN(scale))
{
return false;
}
return true;
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Laplace(Location = " + Mean + ", Scale = " + _scale + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get;
private set;
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
return 2.0 * _scale * _scale;
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
return Math.Sqrt(2.0) * _scale;
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
return Math.Log(2.0 * Constants.E * _scale);
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
return 0.0;
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return 0.5 * (1.0 + (Math.Sign(x - Mean) * (1.0 - Math.Exp(-Math.Abs(x - Mean) / _scale))));
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
return Mean;
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get
{
return Mean;
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return Double.NegativeInfinity;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
return Math.Exp(-Math.Abs(x - Mean) / _scale) / (2.0 * _scale);
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return Math.Log(Density(x));
}
/// <summary>
/// Samples a Laplace distributed random variable.
/// </summary>
/// <returns>a sample from the distribution.</returns>
public double Sample()
{
return DoSample(RandomSource, Mean, _scale);
}
/// <summary>
/// Generates a sample from the Laplace distribution.
/// </summary>
/// <returns>a sample from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource, Mean, _scale);
}
}
#endregion
/// <summary>
/// Samples the distribution.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="location">The location shape parameter.</param>
/// <param name="scale">The scale parameter.</param>
/// <returns>a random number from the distribution.</returns>
private static double DoSample(Random rnd, double location, double scale)
{
var u = rnd.NextDouble() - 0.5;
return location - (scale * Math.Sign(u) * Math.Log(1.0 - (2.0 * Math.Abs(u))));
}
}
}

107
src/Numerics/Distributions/Continuous/LogNormal.cs

@ -3,9 +3,7 @@
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2010 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
@ -14,10 +12,8 @@
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -42,7 +38,7 @@ namespace MathNet.Numerics.Distributions
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to false, all parameter checks can be turned off.</para></remarks>
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class LogNormal : IContinuousDistribution
{
/// <summary>
@ -61,11 +57,16 @@ namespace MathNet.Numerics.Distributions
private Random _random;
/// <summary>
/// Initializes a new instance of the Log-Normal class. The distribution will
/// be initialized with the default <seealso cref="System.Random"/> random number generator.
/// Initializes a new instance of the <see cref="LogNormal"/> class.
/// The distribution will be initialized with the default <seealso cref="System.Random"/>
/// random number generator.
/// </summary>
/// <param name="mu">The mu of the logarithm of the distribution.</param>
/// <param name="sigma">The standard deviation of the logarithm of the distribution.</param>
/// <param name="mu">
/// The mu of the logarithm of the distribution.
/// </param>
/// <param name="sigma">
/// The standard deviation of the logarithm of the distribution.
/// </param>
public LogNormal(double mu, double sigma)
{
SetParameters(mu, sigma);
@ -86,7 +87,7 @@ namespace MathNet.Numerics.Distributions
/// </summary>
/// <param name="mu">The mu of the logarithm of the distribution.</param>
/// <param name="sigma">The standard deviation of the logarithm of the distribution.</param>
/// <returns>True when the parameters are valid, false otherwise.</returns>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double mu, double sigma)
{
if (sigma < 0.0 || Double.IsNaN(mu) || Double.IsNaN(mu) || Double.IsNaN(sigma))
@ -119,9 +120,15 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Mu
{
get { return _mu; }
get
{
return _mu;
}
set { SetParameters(value, _sigma); }
set
{
SetParameters(value, _sigma);
}
}
/// <summary>
@ -129,9 +136,15 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Sigma
{
get { return _sigma; }
get
{
return _sigma;
}
set { SetParameters(_mu, value); }
set
{
SetParameters(_mu, value);
}
}
#region IDistribution implementation
@ -162,7 +175,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Mean
{
get { return Math.Exp(_mu + _sigma * _sigma / 2.0); }
get
{
return Math.Exp(_mu + (_sigma * _sigma / 2.0));
}
}
/// <summary>
@ -172,7 +188,7 @@ namespace MathNet.Numerics.Distributions
{
get
{
double sigma2 = _sigma * _sigma;
var sigma2 = _sigma * _sigma;
return (Math.Exp(sigma2) - 1.0) * Math.Exp(_mu + _mu + sigma2);
}
}
@ -184,7 +200,7 @@ namespace MathNet.Numerics.Distributions
{
get
{
double sigma2 = _sigma * _sigma;
var sigma2 = _sigma * _sigma;
return Math.Sqrt((Math.Exp(sigma2) - 1.0) * Math.Exp(_mu + _mu + sigma2));
}
}
@ -194,7 +210,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Entropy
{
get { return 0.5 + Math.Log(_sigma) + _mu + Constants.LogSqrt2Pi; }
get
{
return 0.5 + Math.Log(_sigma) + _mu + Constants.LogSqrt2Pi;
}
}
/// <summary>
@ -204,10 +223,11 @@ namespace MathNet.Numerics.Distributions
{
get
{
double expsigma2 = Math.Exp(_sigma * _sigma);
var expsigma2 = Math.Exp(_sigma * _sigma);
return (expsigma2 + 2.0) * Math.Sqrt(expsigma2 - 1);
}
}
#endregion
#region IContinuousDistribution implementation
@ -217,7 +237,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Mode
{
get { return Math.Exp(_mu - _sigma * _sigma); }
get
{
return Math.Exp(_mu - (_sigma * _sigma));
}
}
/// <summary>
@ -225,7 +248,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Median
{
get { return Math.Exp(_mu); }
get
{
return Math.Exp(_mu);
}
}
/// <summary>
@ -233,7 +259,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Minimum
{
get { return 0.0; }
get
{
return 0.0;
}
}
/// <summary>
@ -241,7 +270,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Maximum
{
get { return Double.PositiveInfinity; }
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
@ -256,7 +288,7 @@ namespace MathNet.Numerics.Distributions
return 0.0;
}
double a = (Math.Log(x) - _mu) / _sigma;
var a = (Math.Log(x) - _mu) / _sigma;
return Math.Exp(-0.5 * a * a) / (x * _sigma * Constants.Sqrt2Pi);
}
@ -272,8 +304,8 @@ namespace MathNet.Numerics.Distributions
return Double.NegativeInfinity;
}
double a = (Math.Log(x) - _mu) / _sigma;
return -0.5 * a * a - Math.Log(x * _sigma) - Constants.LogSqrt2Pi;
var a = (Math.Log(x) - _mu) / _sigma;
return (-0.5 * a * a) - Math.Log(x * _sigma) - Constants.LogSqrt2Pi;
}
/// <summary>
@ -297,8 +329,7 @@ namespace MathNet.Numerics.Distributions
/// <returns>a sample from the distribution.</returns>
public double Sample()
{
double r2;
return Math.Exp(_mu + (_sigma * Normal.SampleBoxMuller(RandomSource, out r2)));
return Math.Exp(_mu + (_sigma * Normal.SampleBoxMuller(RandomSource).Item1));
}
/// <summary>
@ -307,15 +338,14 @@ namespace MathNet.Numerics.Distributions
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
double r2;
while (true)
{
double r1 = Normal.SampleBoxMuller(RandomSource, out r2);
yield return Math.Exp(_mu + (_sigma * r1));
yield return Math.Exp(_mu + (_sigma * r2));
var sample = Normal.SampleBoxMuller(RandomSource);
yield return Math.Exp(_mu + (_sigma * sample.Item1));
yield return Math.Exp(_mu + (_sigma * sample.Item2));
}
}
#endregion
/// <summary>
@ -332,8 +362,7 @@ namespace MathNet.Numerics.Distributions
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
double r2;
return Math.Exp(mu + (sigma * Normal.SampleBoxMuller(rng, out r2)));
return Math.Exp(mu + (sigma * Normal.SampleBoxMuller(rng).Item1));
}
/// <summary>
@ -349,14 +378,12 @@ namespace MathNet.Numerics.Distributions
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
double r2;
while (true)
{
double r1 = Normal.SampleBoxMuller(rng, out r2);
yield return Math.Exp(mu + (sigma * r1));
yield return Math.Exp(mu + (sigma * r2));
var sample = Normal.SampleBoxMuller(rng);
yield return Math.Exp(mu + (sigma * sample.Item1));
yield return Math.Exp(mu + (sigma * sample.Item2));
}
}
}

123
src/Numerics/Distributions/Continuous/Normal.cs

@ -3,9 +3,7 @@
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2010 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
@ -14,10 +12,8 @@
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -42,7 +38,7 @@ namespace MathNet.Numerics.Distributions
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to false, all parameter checks can be turned off.</para></remarks>
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Normal : IContinuousDistribution
{
/// <summary>
@ -110,11 +106,11 @@ namespace MathNet.Numerics.Distributions
/// be initialized with the default <seealso cref="System.Random"/> random number generator.
/// </summary>
/// <param name="mean">The mean of the normal distribution.</param>
/// <param name="prec">The precision of the normal distribution.</param>
/// <param name="precision">The precision of the normal distribution.</param>
/// <returns>a normal distribution.</returns>
public static Normal WithMeanPrecision(double mean, double prec)
public static Normal WithMeanPrecision(double mean, double precision)
{
return new Normal(mean, 1.0 / Math.Sqrt(prec));
return new Normal(mean, 1.0 / Math.Sqrt(precision));
}
/// <summary>
@ -131,7 +127,7 @@ namespace MathNet.Numerics.Distributions
/// </summary>
/// <param name="mean">The mean of the normal distribution.</param>
/// <param name="stddev">The standard deviation of the normal distribution.</param>
/// <returns>True when the parameters are valid, false otherwise.</returns>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double mean, double stddev)
{
if (stddev < 0.0 || Double.IsNaN(mean) || Double.IsNaN(stddev))
@ -171,7 +167,7 @@ namespace MathNet.Numerics.Distributions
set
{
double sdev = 1.0 / Math.Sqrt(value);
var sdev = 1.0 / Math.Sqrt(value);
// Handle the case when the precision is -0.
if (Double.IsInfinity(sdev))
@ -211,8 +207,15 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Mean
{
get { return _mean; }
set { SetParameters(value, _stdDev); }
get
{
return _mean;
}
set
{
SetParameters(value, _stdDev);
}
}
/// <summary>
@ -220,8 +223,15 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Variance
{
get { return _stdDev * _stdDev; }
set { SetParameters(_mean, value); }
get
{
return _stdDev * _stdDev;
}
set
{
SetParameters(_mean, value);
}
}
/// <summary>
@ -229,8 +239,15 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double StdDev
{
get { return _stdDev; }
set { SetParameters(_mean, value); }
get
{
return _stdDev;
}
set
{
SetParameters(_mean, value);
}
}
/// <summary>
@ -238,7 +255,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Entropy
{
get { return Math.Log(_stdDev) + Constants.LogSqrt2PiE; }
get
{
return Math.Log(_stdDev) + Constants.LogSqrt2PiE;
}
}
/// <summary>
@ -246,8 +266,12 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Skewness
{
get { return 0.0; }
get
{
return 0.0;
}
}
#endregion
#region IContinuousDistribution implementation
@ -257,7 +281,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Mode
{
get { return _mean; }
get
{
return _mean;
}
}
/// <summary>
@ -265,7 +292,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Median
{
get { return _mean; }
get
{
return _mean;
}
}
/// <summary>
@ -273,7 +303,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Minimum
{
get { return Double.NegativeInfinity; }
get
{
return Double.NegativeInfinity;
}
}
/// <summary>
@ -281,7 +314,10 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Maximum
{
get { return Double.PositiveInfinity; }
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
@ -293,7 +329,7 @@ namespace MathNet.Numerics.Distributions
/// <returns>the density at <paramref name="x"/>.</returns>
internal static double Density(double mean, double sdev, double x)
{
double d = (x - mean) / sdev;
var d = (x - mean) / sdev;
return Math.Exp(-0.5 * d * d) / (Constants.Sqrt2Pi * sdev);
}
@ -306,7 +342,7 @@ namespace MathNet.Numerics.Distributions
/// <returns>the log density at <paramref name="x"/>.</returns>
internal static double DensityLn(double mean, double sdev, double x)
{
double d = (x - mean) / sdev;
var d = (x - mean) / sdev;
return (-0.5 * d * d) - Math.Log(sdev) - Constants.LogSqrt2Pi;
}
@ -358,8 +394,7 @@ namespace MathNet.Numerics.Distributions
/// <returns>a sample from the distribution.</returns>
public double Sample()
{
double r2;
return _mean + (_stdDev * SampleBoxMuller(RandomSource, out r2));
return _mean + (_stdDev * SampleBoxMuller(RandomSource).Item1);
}
/// <summary>
@ -368,15 +403,14 @@ namespace MathNet.Numerics.Distributions
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
double r2;
while (true)
{
double r1 = SampleBoxMuller(RandomSource, out r2);
yield return _mean + (_stdDev * r1);
yield return _mean + (_stdDev * r2);
var sample = SampleBoxMuller(RandomSource);
yield return _mean + (_stdDev * sample.Item1);
yield return _mean + (_stdDev * sample.Item2);
}
}
#endregion
/// <summary>
@ -403,8 +437,7 @@ namespace MathNet.Numerics.Distributions
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
double r2;
return mean + (stddev * SampleBoxMuller(rng, out r2));
return mean + (stddev * SampleBoxMuller(rng).Item1);
}
/// <summary>
@ -420,14 +453,12 @@ namespace MathNet.Numerics.Distributions
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
double r2;
while (true)
{
double r1 = SampleBoxMuller(rng, out r2);
yield return mean + (stddev * r1);
yield return mean + (stddev * r2);
var sample = SampleBoxMuller(rng);
yield return mean + (stddev * sample.Item1);
yield return mean + (stddev * sample.Item2);
}
}
@ -435,13 +466,12 @@ namespace MathNet.Numerics.Distributions
/// Samples a pair of standard normal distributed random variables using the <i>Box-Muller</i> algorithm.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="r2">A second random number from the standard normal distribution computed as a side product.</param>
/// <returns>a random number from the standard normal distribution.</returns>
internal static double SampleBoxMuller(Random rnd, out double r2)
/// <returns>a pair of random numbers from the standard normal distribution.</returns>
internal static Tuple<double, double> SampleBoxMuller(Random rnd)
{
double v1 = (2.0 * rnd.NextDouble()) - 1.0;
double v2 = (2.0 * rnd.NextDouble()) - 1.0;
double r = (v1 * v1) + (v2 * v2);
var v1 = (2.0 * rnd.NextDouble()) - 1.0;
var v2 = (2.0 * rnd.NextDouble()) - 1.0;
var r = (v1 * v1) + (v2 * v2);
while (r >= 1.0 || r == 0.0)
{
v1 = (2.0 * rnd.NextDouble()) - 1.0;
@ -449,9 +479,8 @@ namespace MathNet.Numerics.Distributions
r = (v1 * v1) + (v2 * v2);
}
double fac = Math.Sqrt(-2.0 * Math.Log(r) / r);
r2 = v2 * fac;
return v1 * fac;
var fac = Math.Sqrt(-2.0 * Math.Log(r) / r);
return new Tuple<double, double>(v1 * fac, v2 * fac);
}
}
}

352
src/Numerics/Distributions/Continuous/Pareto.cs

@ -0,0 +1,352 @@
// <copyright file="Pareto.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// The Pareto distribution is a power law probability distribution that coincides with social,
/// scientific, geophysical, actuarial, and many other types of observable phenomena.
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Pareto_distribution">Wikipedia - Pareto distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Pareto : IContinuousDistribution
{
/// <summary>
/// The scale parameter of the distribution.
/// </summary>
private double _scale;
/// <summary>
/// The shape parameter of the distribution.
/// </summary>
private double _shape;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="Pareto"/> class.
/// </summary>
/// <param name="scale">
/// The scale parameter of the distribution.
/// </param>
/// <param name="shape">
/// The shape parameter of the distribution.
/// </param>
/// <exception cref="ArgumentException">
/// If <paramref name="scale"/> or <paramref name="shape"/> are negative.
/// </exception>
public Pareto(double scale, double shape)
{
SetParameters(scale, shape);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="scale">The scale parameter of the distribution.</param>
/// <param name="shape">The shape parameter of the distribution.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double scale, double shape)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(scale, shape))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_scale = scale;
_shape = shape;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="scale">The scale parameter of the distribution.</param>
/// <param name="shape">The shape parameter of the distribution.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double scale, double shape)
{
if (scale <= 0 || shape <= 0)
{
return false;
}
if (Double.IsNaN(scale) || Double.IsNaN(shape))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the scale parameter of the distribution.
/// </summary>
public double Scale
{
get
{
return _scale;
}
set
{
SetParameters(value, _shape);
}
}
/// <summary>
/// Gets or sets the shape parameter of the distribution.
/// </summary>
public double Shape
{
get
{
return _shape;
}
set
{
SetParameters(_scale, value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Pareto(Scale = " + _scale + ", Shape = " + _shape + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
if (_shape <= 1)
{
throw new NotSupportedException();
}
return _shape * _scale / (_shape - 1.0);
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
return _scale * _scale * _shape / ((_shape - 1.0) * (_shape - 1.0) * (_scale - 2.0));
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
return (_scale * Math.Sqrt(_shape)) / (Math.Abs(_shape - 1.0) * Math.Sqrt(_shape - 2.0));
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
return Math.Log(_shape / _scale) - (1.0 / _shape) - 1.0;
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
return (2.0 * (_shape + 1.0) / (_shape - 3.0)) * Math.Sqrt((_shape - 2.0) / _shape);
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return 1.0 - Math.Pow(_scale / x, _shape);
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
return _scale;
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get
{
return _scale * Math.Pow(2.0, 1.0 / _shape);
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return _scale;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
return _shape * Math.Pow(_scale, _shape) / Math.Pow(x, _shape + 1.0);
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return Math.Log(Density(x));
}
/// <summary>
/// Draws a random sample from the distribution.
/// </summary>
/// <returns>A random number from this distribution.</returns>
public double Sample()
{
return DoSample(RandomSource);
}
/// <summary>
/// Generates a sequence of samples from the Pareto distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource);
}
}
#endregion
/// <summary>
/// Generates a sample from the Pareto distribution without doing parameter checking.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <returns>a random number from the Pareto distribution.</returns>
private double DoSample(Random rnd)
{
return _scale * Math.Pow(rnd.NextDouble(), -1.0 / _shape);
}
}
}

321
src/Numerics/Distributions/Continuous/Rayleigh.cs

@ -0,0 +1,321 @@
// <copyright file="Rayleigh.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// The Rayleigh distribution (pronounced /ˈreɪli/) is a continuous probability distribution. As an
/// example of how it arises, the wind speed will have a Rayleigh distribution if the components of
/// the two-dimensional wind velocity vector are uncorrelated and normally distributed with equal variance.
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Rayleigh_distribution">Wikipedia - Rayleigh distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Rayleigh : IContinuousDistribution
{
/// <summary>
/// The scale parameter of the distribution.
/// </summary>
private double _scale;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="Rayleigh"/> class.
/// </summary>
/// <param name="scale">
/// The scale parameter of the distribution.
/// </param>
/// <exception cref="ArgumentException">
/// If <paramref name="scale"/> is negative.
/// </exception>
public Rayleigh(double scale)
{
SetParameters(scale);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="scale">The scale parameter of the distribution.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters don't pass the <see cref="IsValidParameterSet"/> function.</exception>
private void SetParameters(double scale)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(scale))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_scale = scale;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="scale">The scale parameter of the distribution.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double scale)
{
if (scale <= 0)
{
return false;
}
if (Double.IsNaN(scale))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the scale parameter of the distribution.
/// </summary>
public double Scale
{
get
{
return _scale;
}
set
{
SetParameters(value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Rayleigh(Scale = " + _scale + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
return _scale * Math.Sqrt(Constants.PiOver2);
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
return (2.0 - Constants.PiOver2) * _scale * _scale;
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
return Math.Sqrt(2.0 - Constants.PiOver2) * _scale;
}
}
/// <summary>
/// Gets the entropy of the distribution.
/// </summary>
public double Entropy
{
get
{
return 1.0 + Math.Log(_scale / Math.Sqrt(2)) + (Constants.EulerMascheroni / 2.0);
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
public double Skewness
{
get
{
return (2.0 * Math.Sqrt(Constants.Pi) * (Constants.Pi - 3.0)) / Math.Pow(4.0 - Constants.Pi, 1.5);
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
return 1.0 - Math.Exp(-x * x / (2.0 * _scale * _scale));
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
public double Mode
{
get
{
return _scale;
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
public double Median
{
get
{
return _scale * Math.Sqrt(Math.Log(4.0));
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
return 0.0;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
return (x / (_scale * _scale)) * Math.Exp(-x * x / (2.0 * _scale * _scale));
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return Math.Log(x / (_scale * _scale)) - (x * x / (2.0 * _scale * _scale));
}
/// <summary>
/// Draws a random sample from the distribution.
/// </summary>
/// <returns>A random number from this distribution.</returns>
public double Sample()
{
return DoSample(RandomSource);
}
/// <summary>
/// Generates a sequence of samples from the Rayleigh distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
while (true)
{
yield return DoSample(RandomSource);
}
}
#endregion
/// <summary>
/// Generates a sample from the Rayleigh distribution without doing parameter checking.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <returns>a random number from the Rayleigh distribution.</returns>
private double DoSample(Random rnd)
{
return _scale * Math.Sqrt(-2.0 * Math.Log(rnd.NextDouble()));
}
}
}

498
src/Numerics/Distributions/Continuous/Stable.cs

@ -0,0 +1,498 @@
// <copyright file="Stable.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
// Copyright (c) 2009-2010 Math.NET
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Distributions
{
using System;
using System.Collections.Generic;
using Properties;
/// <summary>
/// A random variable is said to be stable (or to have a stable distribution) if it has
/// the property that a linear combination of two independent copies of the variable has
/// the same distribution, up to location and scale parameters.
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Stable_distribution">Wikipedia - Stable distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.`
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Stable : IContinuousDistribution
{
/// <summary>
/// The stability parameter of the distribution.
/// </summary>
private double _alpha;
/// <summary>
/// The skewness parameter of the distribution.
/// </summary>
private double _beta;
/// <summary>
/// The scale parameter of the distribution.
/// </summary>
private double _scale;
/// <summary>
/// The location parameter of the distribution.
/// </summary>
private double _location;
/// <summary>
/// The distribution's random number generator.
/// </summary>
private Random _random;
/// <summary>
/// Initializes a new instance of the <see cref="Stable"/> class.
/// </summary>
/// <param name="alpha">
/// The stability parameter of the distribution.
/// </param>
/// <param name="beta">
/// The skewness parameter of the distribution.
/// </param>
/// <param name="scale">
/// The scale parameter of the distribution.
/// </param>
/// <param name="location">
/// The location parameter of the distribution.
/// </param>
public Stable(double alpha, double beta, double scale, double location)
{
SetParameters(alpha, beta, scale, location);
RandomSource = new Random();
}
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="alpha">The stability parameter of the distribution.</param>
/// <param name="beta">The skewness parameter of the distribution.</param>
/// <param name="scale">The scale parameter of the distribution.</param>
/// <param name="location">The location parameter of the distribution.</param>
private void SetParameters(double alpha, double beta, double scale, double location)
{
if (Control.CheckDistributionParameters && !IsValidParameterSet(alpha, beta, scale, location))
{
throw new ArgumentOutOfRangeException(Resources.InvalidDistributionParameters);
}
_alpha = alpha;
_beta = beta;
_scale = scale;
_location = location;
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="alpha">The stability parameter of the distribution.</param>
/// <param name="beta">The skewness parameter of the distribution.</param>
/// <param name="scale">The scale parameter of the distribution.</param>
/// <param name="location">The location parameter of the distribution.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
private static bool IsValidParameterSet(double alpha, double beta, double scale, double location)
{
if (alpha <= 0 || alpha > 2)
{
return false;
}
if (beta < -1 || beta > 1)
{
return false;
}
if (scale <= 0)
{
return false;
}
if (Double.IsNaN(alpha) || Double.IsNaN(beta) || Double.IsNaN(scale) || Double.IsNaN(location))
{
return false;
}
return true;
}
/// <summary>
/// Gets or sets the stability parameter of the distribution.
/// </summary>
public double Alpha
{
get
{
return _alpha;
}
set
{
SetParameters(value, _beta, _scale, _location);
}
}
/// <summary>
/// Gets or sets The skewness parameter of the distribution.
/// </summary>
public double Beta
{
get
{
return _beta;
}
set
{
SetParameters(_alpha, value, _scale, _location);
}
}
/// <summary>
/// Gets or sets the scale parameter of the distribution.
/// </summary>
public double Scale
{
get
{
return _scale;
}
set
{
SetParameters(_alpha, _beta, value, _location);
}
}
/// <summary>
/// Gets or sets the location parameter of the distribution.
/// </summary>
public double Location
{
get
{
return _location;
}
set
{
SetParameters(_alpha, _beta, _scale, value);
}
}
/// <summary>
/// A string representation of the distribution.
/// </summary>
/// <returns>a string representation of the distribution.</returns>
public override string ToString()
{
return "Stable(" + "Stability = " + _alpha + ", Skewness = " + _beta + ", Scale = " + _scale + ", Location = " + _location + ")";
}
#region IDistribution Members
/// <summary>
/// Gets or sets the random number generator which is used to draw random samples.
/// </summary>
public Random RandomSource
{
get
{
return _random;
}
set
{
if (value == null)
{
throw new ArgumentNullException();
}
_random = value;
}
}
/// <summary>
/// Gets the mean of the distribution.
/// </summary>
public double Mean
{
get
{
if (_alpha <= 1)
{
throw new NotSupportedException();
}
return _location;
}
}
/// <summary>
/// Gets the variance of the distribution.
/// </summary>
public double Variance
{
get
{
if (_alpha == 2)
{
return 2.0 * _scale * _scale;
}
return Double.PositiveInfinity;
}
}
/// <summary>
/// Gets the standard deviation of the distribution.
/// </summary>
public double StdDev
{
get
{
if (_alpha == 2)
{
return Math.Sqrt(2.0) * _scale;
}
return Double.PositiveInfinity;
}
}
/// <summary>
/// Gets he entropy of the distribution.
/// </summary>
/// <remarks>Always throws a not supported exception.</remarks>
public double Entropy
{
get
{
throw new NotSupportedException();
}
}
/// <summary>
/// Gets the skewness of the distribution.
/// </summary>
/// <remarks>Throws a not supported exception of <c>Alpha</c> != 2.</remarks>
public double Skewness
{
get
{
if (_alpha != 2)
{
throw new NotSupportedException();
}
return 0.0;
}
}
/// <summary>
/// Computes the cumulative distribution function of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>the cumulative density at <paramref name="x"/>.</returns>
/// <remarks>Throws a not supported exception if <c>Alpha != 2</c>, <c>(Alpha != 1 and Beta !=0)</c>, or <c>(Alpha != 0.5 and Beta != 1)</c></remarks>
public double CumulativeDistribution(double x)
{
if (_alpha == 2)
{
return (new Normal(_location, StdDev)).CumulativeDistribution(x);
}
if (_alpha == 1 && _beta == 0)
{
return (new Cauchy(_location, _scale)).CumulativeDistribution(x);
}
if (_alpha == 0.5 && _beta == 1)
{
return LevyCumulativeDistribution(_scale, _location, x);
}
throw new NotSupportedException();
}
/// <summary>
/// Computes the cumulative distribution function of the Levy distribution.
/// </summary>
/// <param name="scale">The scale parameter.</param>
/// <param name="location">The location parameter.</param>
/// <param name="x">The location at which to compute the cumulative density.</param>
/// <returns>
/// the cumulative density at <paramref name="x"/>.
/// </returns>
private static double LevyCumulativeDistribution(double scale, double location, double x)
{
// The parameters scale and location must be correct
return SpecialFunctions.Erfc(Math.Sqrt(scale / (2 * (x - location))));
}
#endregion
#region IContinuousDistribution Members
/// <summary>
/// Gets the mode of the distribution.
/// </summary>
/// <remarks>Throws a not supported exception if <c>Beta != 0</c>.</remarks>
public double Mode
{
get
{
if (_beta != 0)
{
throw new NotSupportedException();
}
return _location;
}
}
/// <summary>
/// Gets the median of the distribution.
/// </summary>
/// <remarks>Throws a not supported exception if <c>Beta != 0</c>.</remarks>
public double Median
{
get
{
if (_beta != 0)
{
throw new NotSupportedException();
}
return _location;
}
}
/// <summary>
/// Gets the minimum of the distribution.
/// </summary>
public double Minimum
{
get
{
if (Math.Abs(_beta) == 1)
{
return 0.0;
}
return Double.NegativeInfinity;
}
}
/// <summary>
/// Gets the maximum of the distribution.
/// </summary>
public double Maximum
{
get
{
return Double.PositiveInfinity;
}
}
/// <summary>
/// Computes the density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
public double Density(double x)
{
if (_alpha == 2)
{
return (new Normal(_location, StdDev)).Density(x);
}
if (_alpha == 1 && _beta == 0)
{
return (new Cauchy(_location, _scale)).Density(x);
}
if (_alpha == 0.5 && _beta == 1)
{
return LevyDensity(_scale, _location, x);
}
throw new NotSupportedException();
}
/// <summary>
/// Computes the density of the Levy distribution.
/// </summary>
/// <param name="scale">The scale parameter of the distribution.</param>
/// <param name="location">The location parameter of the distribution.</param>
/// <param name="x">The location at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
private static double LevyDensity(double scale, double location, double x)
{
// The parameters scale and location must be correct
if (x < location)
{
throw new NotSupportedException();
}
return (Math.Sqrt(scale / Constants.Pi2) * Math.Exp(-scale / (2 * (x - location)))) / Math.Pow(x - location, 1.5);
}
/// <summary>
/// Computes the log density of the distribution.
/// </summary>
/// <param name="x">The location at which to compute the log density.</param>
/// <returns>the log density at <paramref name="x"/>.</returns>
public double DensityLn(double x)
{
return Math.Log(Density(x));
}
/// <summary>
/// Draws a random sample from the distribution.
/// </summary>
/// <returns>A random number from this distribution.</returns>
public double Sample()
{
throw new NotImplementedException();
}
/// <summary>
/// Generates a sequence of samples from the Stable distribution.
/// </summary>
/// <returns>a sequence of samples from the distribution.</returns>
public IEnumerable<double> Samples()
{
throw new NotImplementedException();
}
#endregion
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save