Skip to content

Commit 1be73a0

Browse files
ooplesclaude
andcommitted
refactor: make context flow fields readonly per pr review
Made _contextStates and _transformationMatrices readonly in ContextFlow class as they are initialized once in constructor and never reassigned. Addresses PR #477 review comments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent aeb3dfb commit 1be73a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NestedLearning/ContextFlow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public class ContextFlow<T> : IContextFlow<T>
1414
{
1515
private readonly int _numLevels;
1616
private readonly int _contextDimension;
17-
private Vector<T>[] _contextStates;
18-
private Matrix<T>[] _transformationMatrices;
17+
private readonly Vector<T>[] _contextStates;
18+
private readonly Matrix<T>[] _transformationMatrices;
1919
private Matrix<T>[] _compressionMatrices;
2020
private static readonly INumericOperations<T> _numOps = MathHelper.GetNumericOperations<T>();
2121

0 commit comments

Comments
 (0)