Skip to content

Commit ea058cf

Browse files
IsTensoric exposed
1 parent 3914283 commit ea058cf

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

AngouriMath/Core/TreeAnalysis/Search/Search.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,6 @@ public Entity FindSubtree(Entity subtree)
113113
/// Finds out whether an expression contains at least one tensor
114114
/// </summary>
115115
/// <returns></returns>
116-
internal bool IsTensoric() => ContainsName("tensort");
116+
public bool IsTensoric() => ContainsName("tensort");
117117
}
118118
}

Samples/Samples/Program.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,10 @@ Entity __c_min(Number val, int depth)
253253

254254
static void Main(string[] _)
255255
{
256-
Entity expr = "x + 2 + (x + 2)";
257-
Console.WriteLine(expr);
258-
256+
Entity a = MathS.Vector(2, 3, 4);
257+
Entity b = MathS.Vector(5, 6, 7);
258+
if (a.IsTensoric() && b.IsTensoric())
259+
Console.WriteLine(MathS.ScalarProduct(a as Tensor, b as Tensor));
259260
/*
260261
Entity expr = "32 + x";
261262
var q = new List<Entity>();

0 commit comments

Comments
 (0)