Compare commits
10 Commits
95ae7950a9
...
33e6f36841
| Author | SHA1 | Date | |
|---|---|---|---|
| 33e6f36841 | |||
| ccb1c521d8 | |||
| a922a8971e | |||
| d37b9957b0 | |||
| 8b747279ce | |||
| dbcb96ec7c | |||
| 7615f8939a | |||
| ffa03575b2 | |||
| 98a5f5db9e | |||
| 99f1e5f5a4 |
13
.idea/.idea.Skeleton.Test/.idea/.gitignore
generated
vendored
Normal file
13
.idea/.idea.Skeleton.Test/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/projectSettingsUpdater.xml
|
||||
/.idea.Skeleton.Test.iml
|
||||
/modules.xml
|
||||
/contentModel.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
4
.idea/.idea.Skeleton.Test/.idea/encodings.xml
generated
Normal file
4
.idea/.idea.Skeleton.Test/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
8
.idea/.idea.Skeleton.Test/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.Skeleton.Test/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/.idea.Skeleton.Test/.idea/vcs.xml
generated
Normal file
7
.idea/.idea.Skeleton.Test/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/../Skeleton" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
13
.idea/.idea.SkeletonTest.dir/.idea/.gitignore
generated
vendored
Normal file
13
.idea/.idea.SkeletonTest.dir/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/.idea.SkeletonTest.iml
|
||||
/contentModel.xml
|
||||
/modules.xml
|
||||
/projectSettingsUpdater.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
4
.idea/.idea.SkeletonTest.dir/.idea/encodings.xml
generated
Normal file
4
.idea/.idea.SkeletonTest.dir/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
13
.idea/.idea.SkeletonTest/.idea/.gitignore
generated
vendored
Normal file
13
.idea/.idea.SkeletonTest/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/contentModel.xml
|
||||
/projectSettingsUpdater.xml
|
||||
/.idea.SkeletonTest.iml
|
||||
/modules.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
4
.idea/.idea.SkeletonTest/.idea/encodings.xml
generated
Normal file
4
.idea/.idea.SkeletonTest/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
8
.idea/.idea.SkeletonTest/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.SkeletonTest/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/.idea.SkeletonTest/.idea/vcs.xml
generated
Normal file
7
.idea/.idea.SkeletonTest/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../Skeleton" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,5 +1,5 @@
|
||||
sed -i '/^Project.*"Skeleton".*/d' ./SkeletonTest.sln
|
||||
sed -i '/^EndProject$/d' ./SkeletonTest.sln
|
||||
sed -i '/^Project.*/aEndProject' ./SkeletonTest.sln
|
||||
sed -i '/^Project.*"Skeleton".*/d' ./Skeleton.Test.sln
|
||||
sed -i '/^EndProject$/d' ./Skeleton.Test.sln
|
||||
sed -i '/^Project.*/aEndProject' ./Skeleton.Test.sln
|
||||
|
||||
sed -i '/.*ProjectReference.*Skeleton.csproj.*/d' ./SkeletonTest.csproj
|
||||
sed -i '/.*ProjectReference.*/d' ./Skeleton.Test.csproj
|
||||
@@ -1,10 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
2
Skeleton.Test.csproj.DotSettings
Normal file
2
Skeleton.Test.csproj.DotSettings
Normal file
@@ -0,0 +1,2 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=tests/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkeletonTest", "SkeletonTest.csproj", "{58767D91-4AE1-43EB-9DBC-498EE84DE6AC}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Skeleton.Test", "Skeleton.Test.csproj", "{58767D91-4AE1-43EB-9DBC-498EE84DE6AC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Skeleton", "..\Skeleton\Skeleton.csproj", "{61DBA845-169F-473E-B084-09B6A0E3762C}"
|
||||
EndProject
|
||||
11
Skeleton.Test.sln.DotSettings.user
Normal file
11
Skeleton.Test.sln.DotSettings.user
Normal file
@@ -0,0 +1,11 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/Environment/Hierarchy/Build/BuildTool/CustomBuildToolPath/@EntryValue">/usr/lib/dotnet/sdk/8.0.110/MSBuild.dll</s:String>
|
||||
<s:String x:Key="/Default/Environment/Hierarchy/Build/BuildTool/DotNetCliExePath/@EntryValue">/usr/lib/dotnet/dotnet</s:String>
|
||||
<s:Int64 x:Key="/Default/Environment/Hierarchy/Build/BuildTool/MsbuildVersion/@EntryValue">4294967294</s:Int64>
|
||||
<s:Boolean x:Key="/Default/Environment/Hierarchy/Build/BuildTool/RecentBuildToolPaths/=_002Fusr_002Flib_002Fdotnet_002Fsdk_002F8_002E0_002E110_002FMSBuild_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=996f1696_002D38c8_002D48d8_002Da948_002Ddaa24c1498f3/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Solution />
|
||||
</SessionState></s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=d01aff50_002D0713_002D48c1_002Da4de_002Da093a716f694/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="All tests from &lt;Skeleton.Test&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Project Location="/home/hzhang/RiderProjects/Marshmallow/Skeleton.Test" Presentation="&lt;Skeleton.Test&gt;" />
|
||||
</SessionState></s:String></wpf:ResourceDictionary>
|
||||
4
SkeletonTest.sln.DotSettings.user
Normal file
4
SkeletonTest.sln.DotSettings.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=57175bc5_002D3ffe_002D4664_002D9725_002D1923c035c70a/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from &lt;SkeletonTest&gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<Project Location="/home/hzhang/RiderProjects/SkeletonTest" Presentation="&lt;SkeletonTest&gt;" />
|
||||
</SessionState></s:String></wpf:ResourceDictionary>
|
||||
@@ -9,6 +9,8 @@ for x in d['data']:
|
||||
|
||||
w = open('SkeletonTest.csproj', 'r').read()
|
||||
s = w.split('<ItemGroup>')
|
||||
w = s[0] + '<ItemGroup>\n<PackageReference Include="Skeleton" Version="'+version+'"/>' + s[1]
|
||||
s[1] = '\n<PackageReference Include="Skeleton" Version="'+version+'"/>\n' + s[1]
|
||||
w = '<ItemGroup>'.join(s)
|
||||
print(w)
|
||||
with open('SkeletonTest.csproj', 'w') as f:
|
||||
f.write(w)
|
||||
f.write(w)
|
||||
@@ -2,11 +2,10 @@ using System.Numerics;
|
||||
using Skeleton.Algebra.AffineSpaces;
|
||||
using Skeleton.Algebra.DimensionProviders;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
|
||||
using AffineC2Space = Skeleton.Algebra.CategoryOf<IDim2>.OnField<Complex>.FAffineSpace;
|
||||
public static class AffineSpaceTest
|
||||
namespace Skeleton.Test;
|
||||
using AffineC2Space = Algebra.CategoryOf<IDim2>.OnField<Complex>.FAffineSpace;
|
||||
[TestFixture]
|
||||
public class AffineSpaceTest : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public static void BasicAffineSpaceTest()
|
||||
|
||||
@@ -4,9 +4,9 @@ using System.Numerics;
|
||||
using Skeleton.Algebra.Extensions;
|
||||
using Skeleton.Analysis.AnalyticFunctions.Polynomials.Implements;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class AlgebraMiscTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class AlgebraMiscTest : BaseTest
|
||||
{
|
||||
|
||||
private static readonly Complex ii = new Complex(0, 1);
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Skeleton.DataStructure;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class CacheItemTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class CacheItemTest : BaseTest
|
||||
{
|
||||
|
||||
private class TestClass
|
||||
@@ -161,5 +162,33 @@ public static class CacheItemTest
|
||||
Assert.That(a.BB.Get, Is.EqualTo(0));
|
||||
Assert.That(b.BA.Get, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void Test4()
|
||||
{
|
||||
CacheItem<int> x = new CacheItem<int>(s => 1);
|
||||
CacheItem<int> w = new CacheItem<int>(a => x.GetFrom(a) + x.GetFrom(a));
|
||||
CacheItem<int> g = new CacheItem<int>(a => w.GetFrom(a) + w.GetFrom(a) + x.GetFrom(a));
|
||||
Assert.That(g.Get, Is.EqualTo(5));
|
||||
x.Assign(2);
|
||||
Console.WriteLine(g.Get);
|
||||
Assert.That(g.Get, Is.EqualTo(10));
|
||||
}
|
||||
[Test]
|
||||
public static void Test5()
|
||||
{
|
||||
CacheItem<int> x1 = new CacheItem<int>(x => 1);
|
||||
CacheItem<int> x2 = new CacheItem<int>(x => x1.GetFrom(x));
|
||||
CacheItem<int> x3 = new CacheItem<int>(x => x2.GetFrom(x));
|
||||
CacheItem<int> x4 = new CacheItem<int>(x => x3.GetFrom(x));
|
||||
|
||||
Console.WriteLine(x4.Get);
|
||||
x1.Assign(3);
|
||||
Assert.IsTrue(x2.Expired);
|
||||
Assert.IsTrue(x3.Expired);
|
||||
Assert.IsTrue(x4.Expired);
|
||||
Console.WriteLine(x4.Get);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,14 +4,19 @@ using System.Numerics;
|
||||
using Skeleton.Algebra.Extensions;
|
||||
using Skeleton.Samples;
|
||||
using Skeleton.Utils;
|
||||
using Skeleton.Utils.Helpers;
|
||||
using Skeleton.Utils.RandomEngines;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public class CayleySU3Test
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class CayleySU3Test : BaseTest
|
||||
{
|
||||
|
||||
[DatapointSource]
|
||||
private static readonly LieSU3[] Data = 40.ScaleSamples(-1, 1).LieSU3LogSU3Samples().ToArray();
|
||||
private static readonly LieSU3[] Data = 40
|
||||
.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1)
|
||||
.LieSU3LogSU3Samples()
|
||||
.ToArray();
|
||||
private static Action<LieSU3> OnFail = x => Console.WriteLine(x.CSharpRepresentation);
|
||||
[Theory]
|
||||
public static void TestCayleyForLieSU3(LieSU3 data)
|
||||
|
||||
@@ -4,13 +4,18 @@ using System.Numerics;
|
||||
using Skeleton.Algebra.Extensions;
|
||||
using Skeleton.Samples;
|
||||
using Skeleton.Utils;
|
||||
using Skeleton.Utils.Helpers;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class CayleySU4Test
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class CayleySU4Test : BaseTest
|
||||
{
|
||||
[DatapointSource]
|
||||
private static readonly LieSU4[] Data = 40.ScaleSamples(-1, 1).LieSU4LogSU4Samples().ToArray();
|
||||
private static readonly LieSU4[] Data = 40
|
||||
.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1)
|
||||
.LieSU4LogSU4Samples()
|
||||
.ToArray();
|
||||
private static Action<LieSU4> OnFail = x => Console.WriteLine(x.CSharpRepresentation);
|
||||
[Theory]
|
||||
public static void TestCayleyForLieSU4(LieSU4 data)
|
||||
|
||||
@@ -3,13 +3,18 @@ using System.Linq;
|
||||
using Skeleton.Algebra.Extensions;
|
||||
using Skeleton.Samples;
|
||||
using Skeleton.Utils;
|
||||
using Skeleton.Utils.Helpers;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class CayleyTransformationTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class CayleyTransformationTest : BaseTest
|
||||
{
|
||||
[DatapointSource]
|
||||
private static readonly LieSU2[] Data = 40.ScaleSamples(-1, 1).LieSU2LogSU2Samples().ToArray();
|
||||
private static readonly LieSU2[] Data = 40
|
||||
.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1)
|
||||
.LieSU2LogSU2Samples()
|
||||
.ToArray();
|
||||
private static Action<LieSU2> OnFail = x => Console.WriteLine(x.CSharpRepresentation);
|
||||
[Theory]
|
||||
public static void TestCayleyForLieSU2(LieSU2 data)
|
||||
|
||||
@@ -6,14 +6,17 @@ using Skeleton.Algebra.ScalarFieldStructure;
|
||||
using Skeleton.DataStructure.Packs.MatrixDecompositions;
|
||||
using Skeleton.Samples;
|
||||
using Skeleton.Utils;
|
||||
using Skeleton.Utils.Helpers;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class DecompositionTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class DecompositionTest : BaseTest
|
||||
{
|
||||
[DatapointSource]
|
||||
public static readonly IEnumerable<C44> TestMatrices =
|
||||
100.ScaleSamples(-1, 1).C44InvertibleSamples();
|
||||
public static readonly IEnumerable<C44> TestMatrices = 100
|
||||
.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1)
|
||||
.C44InvertibleSamples();
|
||||
|
||||
private static readonly Action<C44> OnFail = x =>
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public class DraftTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class DraftTest : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public void QRDraftTest()
|
||||
|
||||
@@ -4,15 +4,19 @@ using System.Numerics;
|
||||
using Skeleton.Algebra.Extensions;
|
||||
using Skeleton.DataStructure.Packs.MatrixDecompositions;
|
||||
using Skeleton.Samples;
|
||||
using Skeleton.Utils.Helpers;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public class EigenDecompositionTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class EigenDecompositionTest : BaseTest
|
||||
{
|
||||
private static readonly Complex I = Complex.ImaginaryOne;
|
||||
[DatapointSource]
|
||||
public static readonly C22[] DataPoints =
|
||||
30.ScaleSamples(-1, 1).C22InvertibleSamples().ToArray();
|
||||
public static readonly C22[] DataPoints = 30
|
||||
.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1)
|
||||
.C22InvertibleSamples()
|
||||
.ToArray();
|
||||
|
||||
[Theory]
|
||||
public static void DecompositionIdentityTest(C22 data)
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Numerics;
|
||||
using Skeleton.Algebra.Matrices;
|
||||
using Skeleton.Constants;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class EigenValueTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class EigenValueTest : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public static void AlgebraicMultiplicityTest()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Skeleton.Algebra.ScalarFieldStructure;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class FieldStructureTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class FieldStructureTest : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public static void EqualTest()
|
||||
|
||||
@@ -3,13 +3,17 @@ using System.Numerics;
|
||||
using Skeleton.Samples;
|
||||
using Skeleton.Utils.Helpers;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class JordanPowerTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class JordanPowerTest : BaseTest
|
||||
{
|
||||
private static readonly Complex ii = new Complex(0, 1);
|
||||
[DatapointSource]
|
||||
public static readonly Complex[] Basic0TestData = 10.ScaleSamples(-1, 1).UCSamples().ToArray();
|
||||
public static readonly Complex[] Basic0TestData = 10
|
||||
.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1)
|
||||
.UCSamples()
|
||||
.ToArray();
|
||||
[Theory]
|
||||
public static void J22TestBasic0(Complex eigenValue)
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using Skeleton.Constants;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class LieSU3FastEigenValueTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class LieSU3FastEigenValueTest : BaseTest
|
||||
{
|
||||
private static IEnumerable<Complex> FastEigen(LieSU3 a)
|
||||
{
|
||||
|
||||
@@ -2,9 +2,9 @@ using System;
|
||||
using System.Linq;
|
||||
using Skeleton.DataStructure.Link;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class LinkTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class LinkTest : BaseTest
|
||||
{
|
||||
private class TestObj
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Skeleton.Constants;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class MatrixExpLogTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class MatrixExpLogTest : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public static void ExpTestCase0()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class MiscTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class MiscTest : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public static void LatexStringTest()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using Skeleton.Constants;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class MultiplicationTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class MultiplicationTest : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public static void Dim2MultiplicationTest()
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
namespace Skeleton.Test;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class REFFTest
|
||||
|
||||
[TestFixture]
|
||||
public class REFFTest : BaseTest
|
||||
{
|
||||
|
||||
private static readonly Complex ii = new Complex(0, 1);
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Numerics;
|
||||
using Skeleton.Algebra.Extensions;
|
||||
using Skeleton.Constants;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class SUTestFix
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class SUTestFix : BaseTest
|
||||
{
|
||||
[Test]
|
||||
public static void Dim2Test()
|
||||
|
||||
@@ -6,18 +6,20 @@ using Skeleton.Constants;
|
||||
using Skeleton.DataStructure.Packs.MatrixDecompositions;
|
||||
using Skeleton.Samples;
|
||||
using Skeleton.Utils;
|
||||
using Skeleton.Utils.Helpers;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class UnitaryMatrixFixTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class UnitaryMatrixFixTest : BaseTest
|
||||
{
|
||||
private static Complex I = Complex.ImaginaryOne;
|
||||
[DatapointSource]
|
||||
public static readonly ((SU2, SU3), SU4)[] DataSource =
|
||||
20.ScaleSamples(-1, 1).SU2U2FixSamples()
|
||||
.Zip(20.ScaleSamples(-1, 1).SU3U3FixSamples())
|
||||
.Zip(20.ScaleSamples(-1, 1).SU4U4FixSamples())
|
||||
.ToArray();
|
||||
public static readonly ((SU2, SU3), SU4)[] DataSource = 20
|
||||
.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1).SU2U2FixSamples()
|
||||
.Zip(20.ScaleSamples(-1, 1).SU3U3FixSamples())
|
||||
.Zip(20.ScaleSamples(-1, 1).SU4U4FixSamples())
|
||||
.ToArray();
|
||||
public static readonly Action<((SU2, SU3), SU4 )> TheoryOnFail = data =>
|
||||
{
|
||||
Console.WriteLine("SU2 : ");
|
||||
|
||||
@@ -5,13 +5,14 @@ using Skeleton.Samples;
|
||||
using Skeleton.Utils;
|
||||
using Skeleton.Utils.Helpers;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
|
||||
public static class UnitaryTest
|
||||
namespace Skeleton.Test;
|
||||
[TestFixture]
|
||||
public class UnitaryTest : BaseTest
|
||||
{
|
||||
[DatapointSource]
|
||||
public static readonly (((U2, U3), U4),((U2, U3), U4))[] DataSource =
|
||||
20.ScaleSamples(-1, 1).U2FixSamples()
|
||||
20.WithSeed(Seed)
|
||||
.ScaleSamples(-1, 1).U2FixSamples()
|
||||
.Zip(20.ScaleSamples(-1, 1).U3FixSamples())
|
||||
.Zip(20.ScaleSamples(-1, 1).U4FixSamples())
|
||||
.ShuffleZip()
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
|
||||
namespace SkeletonTest.tests;
|
||||
namespace Skeleton.Test;
|
||||
|
||||
/// <summary>
|
||||
/// test for vector spaces
|
||||
/// </summary>
|
||||
public static class VectorSpaceTest
|
||||
[TestFixture]
|
||||
public class VectorSpaceTest : BaseTest
|
||||
{
|
||||
private static readonly Complex ii = new Complex(0, 1);
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user