コード例 #1
0
 @Test
 public void test7() {
   Tensor t = parse("A*(B+E*(R+K*U))", "^i", "_j");
   Indices indices = ParserIndices.parseSimple("^i_j");
   Tensor e = Tensors.parse("A^i_a*(B^a_j+E^a_b*(R^b_j+K^b_c*U^c_j))");
   assertIndicesParity(t.getIndices().getFree(), indices);
   assertEqualsExactly(t, e);
 }
コード例 #2
0
 @Test
 public void test13() {
   Tensor t = parse("A+B", "^i", "_i", "A");
   Tensor e = Tensors.parse("A^i_i+B");
   assertEqualsExactly(t, e);
 }