Skip to content

Commit

Permalink
clean up JUnit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Jan 12, 2025
1 parent ea233b3 commit 8cd4844
Showing 1 changed file with 0 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2428,40 +2428,6 @@ public void testClearAttributes() {
"{Orderless}");
}

@Test
public void testClebschGordan() {
check("ClebschGordan({j, m}, {j1, m1}, {j2, m2})", //
"(-1)^(j-j1+m2)*Sqrt(1+2*j2)*ThreeJSymbol({j,m},{j1,m1},{j2,-m2})");
// https://en.wikipedia.org/wiki/Table_of_Clebsch%E2%80%93Gordan_coefficients
check("ClebschGordan({3/2, -3/2}, {3/2, 3/2}, {1, 0})", //
"3/2*1/Sqrt(5)");


// print message "is not physical
check("ClebschGordan({2, 1}, {2, 4}, {4, 2})", //
"0");

check("ClebschGordan({5, 0}, {4, 0}, {1, 0})", //
"Sqrt(5/33)");
check("ClebschGordan({1/2, -1/2}, {1/2, -1/2}, {1, -1})", //
"1");
check("ClebschGordan({1/2, -1/2}, {1, 0}, {1/2, -1/2})", //
"-1/Sqrt(3)");

check("With({j1 = 3, j2 = 2},\n" //
+ " Table(Sum(\n" //
+ " If(Abs(m1 + m2) > j || Abs(m1 + m2) > ji, 0, \n" //
+ " ClebschGordan({j1, m1}, {j2, m2}, {j, \n" //
+ " m1 + m2}) ClebschGordan({j1, m1}, {j2, m2}, {ji, \n" //
+ " m1 + m2})), {m1, -j1, j1}, {m2, -j2, j2}), {j, Abs(j1 - j2), \n" //
+ " j1 + j2}, {ji, Abs(j1 - j2), j1 + j2})) // MatrixForm", //
"{{3,0,0,0,0},\n" //
+ " {0,5,0,0,0},\n" //
+ " {0,0,7,0,0},\n" //
+ " {0,0,0,9,0},\n" //
+ " {0,0,0,0,11}}");
}

@Test
public void testClip() {
check("Clip(7.5,{-7.0,7.0})", //
Expand Down Expand Up @@ -22827,37 +22793,6 @@ public void testSinh() {
"Indeterminate");
}


@Test
public void testSixJSymbol() {
check("SixJSymbol({1, 2, 3}, {1, 2, 3})", //
"1/105");
check("SixJSymbol({1/2, 1/2, 1}, {5/2, 7/2, 3})", //
"-1/Sqrt(21)");
check("SixJSymbol({1, 2, 3}, {2, 1, 2})", //
"1/(5*Sqrt(21))");
checkNumeric("SixJSymbol({1.0, 2.0, 1.0}, {2,3,2})", //
"0.043643578047198484");
checkNumeric("SixJSymbol({1.0, 1.0, 2.0}, {5,7,6})", //
"0.12403473458920847");

// SixJSymbol: SixJSymbol({1,2,1},{4,5,Pi}) is not triangular.
check("SixJSymbol({1, 2, 1}, {4,5,Pi})", //
"0");
// SixJSymbol: SixJSymbol({1,2,1},{4,5,12}) is not triangular.
check("SixJSymbol({1, 2, 1}, {4,5,12})", //
"0");

check("SixJSymbol({1, 1, 2}, {5,7,6})", //
"1/Sqrt(65)");
check("SixJSymbol({1, 2, 1}, {2,3,2})", //
"1/(5*Sqrt(21))");
check("SixJSymbol({1, 2, 3}, {2, 1, 2})", //
"1/(5*Sqrt(21))");
check("SixJSymbol({1, 2, 3}, {1,2,2})", //
"1/15");
}

@Test
public void testSkewness() {
check("Skewness(WeibullDistribution(n,m))", //
Expand Down Expand Up @@ -24513,43 +24448,6 @@ public void testThread() {
"{f(a,h,x),f(b,h,y),f(c,h,z)}");
}

@Test
public void testThreeJSymbol() {
check("ThreeJSymbol({2, 1}, {2, 4}, {4, 2})", //
"0");

checkNumeric("ThreeJSymbol({1.5, -1.5}, {3/2, 3/2}, {1, 0})", //
"0.3872983346207417");
checkNumeric("ThreeJSymbol({1/2, -1/2}, {1/2, -1/2}, {1.0, 1.0})", //
"-0.5773502691896257");


check("ThreeJSymbol({3/2, -3/2}, {3/2, 3/2}, {1, 0})", //
"Sqrt(3/5)/2");
check("ThreeJSymbol({1/2, -1/2}, {1/2, -1/2}, {1, 1})", //
"-1/Sqrt(3)");

check("ThreeJSymbol({2, 0}, {6, 0}, {4, 0})", //
"Sqrt(5/143)");

check("ThreeJSymbol({5, 0}, {4, 0}, {1, 0})", //
"-Sqrt(5/11)/3");
check("ThreeJSymbol({6, 0}, {4, 0}, {2, 0})", //
"Sqrt(5/143)");
check("ThreeJSymbol({2, 1}, {2, 2}, {4, -3})", //
"-1/(3*Sqrt(2))");


check("{j1, j2} = {3, 2};\n" //
+ "Table(Sum(\n" //
+ " If(Abs(m1 + m2) > j || Abs(m1 + m2) > ji, 0, \n" //
+ " Sqrt((2 j + 1) (2 ji + 1))*ThreeJSymbol({j1, m1}, {j2, \n" //
+ " m2}, {j, -(m1 + m2)})*ThreeJSymbol({j1, m1}, {j2, \n" //
+ " m2}, {ji, -(m1 + m2)})), {m1, -j1, j1}, {m2, -j2, j2}), {j, \n" //
+ " Abs(j1 - j2), j1 + j2}, {ji, Abs(j1 - j2), j1 + j2})", //
"{{3,0,0,0,0},{0,5,0,0,0},{0,0,7,0,0},{0,0,0,9,0},{0,0,0,0,11}}");
}

@Test
public void testThrough() {

Expand Down

0 comments on commit 8cd4844

Please sign in to comment.