Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Falcion committed Jan 20, 2024
1 parent 90e3541 commit 7b7662f
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -702,3 +702,6 @@ out/
# Git repository infrastructure
package-lock.json
manifest-backup.json

# Project source
!source/**/Logs
2 changes: 1 addition & 1 deletion source/Data/Arrays/Jenga.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Zustand.Data.Arrays
/// <summary>
/// A non-generic dynamic representation of <see cref="Jenga{T}"/> which holds <see cref="Object"/> as it's primary type
/// </summary>
public class Jenga : Jenga<object>
public sealed class Jenga : Jenga<object>
{
/* Not-implemented code. */
}
Expand Down
14 changes: 10 additions & 4 deletions source/Flow/Exceptions/StateflowInitializationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public StateflowInitializationException() { }
/// </param>
public StateflowInitializationException(Stateflow data) :
base(Format(data))
{ _data = data; }
{
_data = data;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -36,7 +38,9 @@ public StateflowInitializationException(Stateflow data) :
/// </param>
public StateflowInitializationException(Stateflow data, string message)
: base(message)
{ _data = data; }
{
_data = data;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -54,8 +58,10 @@ public StateflowInitializationException(Stateflow data, string message,
Exception inner) :
base(message,
inner)
{ _data = data; }

{
_data = data;
}

/// <summary>
/// An instance of <see cref="Stateflow"/> which caused an exception
/// </summary>
Expand Down
86 changes: 66 additions & 20 deletions source/Flow/Stateflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public Stateflow(State state,
/// An internal method which nullifies the transdefinition of current instance
/// </summary>
internal void Redetermine()
=> Transdefinition = null;
=> Transdefinition = null;

/// <summary>
/// An internal method which redefines the transdefinition of current instance within custom signed 32-bit integer matrix
Expand Down Expand Up @@ -373,6 +373,7 @@ internal void Redetermine(Transdefs transdefinition)
/// </param>
public void Redirect(State? state)
=> _state = state;

/// <summary>
/// Method which updates instance of current <see cref="Stateflow"/>
/// </summary>
Expand All @@ -387,6 +388,7 @@ public void Redirect(State? state, Stateflow? inner)
_state = state;
_inner = inner;
}

/// <summary>
/// Method which updates instance of current <see cref="Stateflow"/>
/// </summary>
Expand All @@ -395,6 +397,7 @@ public void Redirect(State? state, Stateflow? inner)
/// </param>
public void Redirect(Shift? shift)
=> _shift = shift;

/// <summary>
/// Method which updates instance of current <see cref="Stateflow"/>
/// </summary>
Expand All @@ -409,6 +412,7 @@ public void Redirect(Shift? shift, Stateflow? inner)
_shift = shift;
_inner = inner;
}

/// <summary>
/// Method which updates instance of current <see cref="Stateflow"/>
/// </summary>
Expand All @@ -417,6 +421,7 @@ public void Redirect(Shift? shift, Stateflow? inner)
/// </param>
public void Redirect(Stateflow? inner)
=> _inner = inner;

/// <summary>
/// Method which updates instance of current <see cref="Stateflow"/>
/// </summary>
Expand All @@ -435,6 +440,7 @@ public void Redirect(Stateflow? inner, State? state, Shift? shift)
_state = state;
_shift = shift;
}

/// <summary>
/// Method which updates instance of current <see cref="Stateflow"/>
/// </summary>
Expand All @@ -455,7 +461,12 @@ public void Redirect(State state,
/// Method which nullifies the transdefinition of current instance and reasserts the boolean parameter of it
/// </summary>
public void Translate()
{ Redetermine(); Define(false); }
{
Redetermine();

Define(false);
}

/// <summary>
/// Method which redefines the transdefinition of current instance within custom signed 32-bit integer matrix and reasserts the boolean parameter of it
/// </summary>
Expand All @@ -465,15 +476,20 @@ public void Translate()
#pragma warning disable S2368
public void Translate(int[,] matrix)
#pragma warning restore S2368
{ Redetermine(matrix); Define(true); }
{
Redetermine(matrix);

Define(true);
}

/// <summary>
/// Method which redefines the transdefinition of current instance within another instance of transdefinition and reasserts the boolean parameter of it
/// </summary>
/// <param name="transdefinition">
/// An instance of <see cref="Subflow.Transdefs"/> with which current one would be replaced
/// </param>
public void Translate(Transdefs transdefinition)
{ Redetermine(transdefinition); }
=> Redetermine(transdefinition);

/// <summary>
/// Method which nullifies every parameter of current instance or defines it to the default value
Expand Down Expand Up @@ -552,7 +568,9 @@ public class Stateflow<T> : Stateflow where T : notnull
/// A generic type <typeparamref name="T"/> value representing designation of the instance of the stateflow
/// </param>
public Stateflow(T designation) : base()
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -564,7 +582,9 @@ public Stateflow(T designation) : base()
/// An instance of <see cref="Subflow.State"/> which represents the shift of the current instance
/// </param>
public Stateflow(T designation, State state) : base(state)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -580,7 +600,9 @@ public Stateflow(T designation, State state) : base(state)
/// </param>
public Stateflow(T designation, State state, Transdefs transdefinition) : base(state,
transdefinition)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -599,7 +621,9 @@ public Stateflow(T designation, State state, Transdefs transdefinition) : base(s
/// </param>
public Stateflow(T designation, State state, Stateflow inner, bool is_defined = false) : base(state,
inner, is_defined)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -619,7 +643,9 @@ public Stateflow(T designation, State state, Stateflow inner, bool is_defined =
public Stateflow(T designation, State state, Stateflow inner, Transdefs transdefinition) : base(state,
inner,
transdefinition)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -631,7 +657,9 @@ public Stateflow(T designation, State state, Stateflow inner, Transdefs transdef
/// An instance of <see cref="Subflow.Shift"/> which represents the shift of the current instance
/// </param>
public Stateflow(T designation, Shift shift) : base(shift)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -645,7 +673,9 @@ public Stateflow(T designation, Shift shift) : base(shift)
/// </param>
public Stateflow(T designation, Shift shift, Transdefs transdefinition) : base(shift,
transdefinition)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -664,8 +694,10 @@ public Stateflow(T designation, Shift shift, Transdefs transdefinition) : base(s
/// </param>
public Stateflow(T designation, Shift shift, Stateflow inner, bool is_defined = false) : base(shift,
inner, is_defined)
{ Designation = designation; }

{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
/// </summary>
Expand All @@ -684,7 +716,9 @@ public Stateflow(T designation, Shift shift, Stateflow inner, bool is_defined =
public Stateflow(T designation, Shift shift, Stateflow inner, Transdefs transdefinition) : base(shift,
inner,
transdefinition)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -699,7 +733,9 @@ public Stateflow(T designation, Shift shift, Stateflow inner, Transdefs transdef
/// Boolean parameter which defines does stateflow is using transdefinitions in it's behaviour
/// </param>
public Stateflow(T designation, Stateflow inner, bool is_defined = false) : base(inner, is_defined)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -715,7 +751,9 @@ public Stateflow(T designation, Stateflow inner, bool is_defined = false) : base
/// </param>
public Stateflow(T designation, Stateflow inner, Transdefs transdefinition) : base(inner,
transdefinition)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -738,7 +776,9 @@ public Stateflow(T designation, Stateflow inner, Transdefs transdefinition) : ba
public Stateflow(T designation, Stateflow inner, State state, Shift shift, bool is_defined = false) : base(inner,
state,
shift, is_defined)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -762,7 +802,9 @@ public Stateflow(T designation, Stateflow inner, State state, Shift shift, Trans
state,
shift,
transdefinition)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -777,7 +819,9 @@ public Stateflow(T designation, Stateflow inner, State state, Shift shift, Trans
/// Boolean parameter which defines would be instance created with empty instances of state and shift or not
/// </param>
public Stateflow(T designation, Transdefs transdefinition, bool recompile = false) : base(transdefinition, recompile)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Instance constructor for the class
Expand All @@ -794,7 +838,9 @@ public Stateflow(T designation, Transdefs transdefinition, bool recompile = fals
public Stateflow(T designation, State state,
Shift shift) : base(state,
shift)
{ Designation = designation; }
{
Designation = designation;
}

/// <summary>
/// Method which redefines the value of the designation of the instance of the <see cref="Stateflow{T}"/>
Expand Down
7 changes: 7 additions & 0 deletions source/Logs/Interfaces/ILog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Zustand.Logs.Interfaces
{
public interface ILog
{

}
}
9 changes: 9 additions & 0 deletions source/Logs/Log.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Zustand.Logs
{
using Zustand.Logs.Interfaces;

public struct Log : ILog
{

}
}
11 changes: 5 additions & 6 deletions source/Subflow/Shift.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public void Transform(uint delta_weight)
/// A signed 32-bit integer value which represents coefficient with which combination of weights would be found
/// </param>
public void Transform(uint delta_weight, int coef)
=> this._weight += (uint)(delta_weight + delta_weight % coef);
=> this._weight += (uint)(delta_weight + delta_weight % coef);

/// <summary>
/// Method which changes current value of stable parameter for current instance
Expand Down Expand Up @@ -328,7 +328,7 @@ public void Transform(ISubflow another_flow)
/// Method which sets stable parameter by default as unstable
/// </summary>
public void Irrationalize()
=> this._stable = false;
=> this._stable = false;

/// <summary>
/// Method which reassembles non-essential data of instance within specified behavior
Expand Down Expand Up @@ -357,7 +357,7 @@ public void Nullify()
/// A signed 64-bit integer value which represents the private key for current shift
/// </param>
public void Reidentify(long key)
=> this.key = key;
=> this.key = key;

/// <summary>
/// Method which changes the identity of current instance through combination of key and coefficient
Expand All @@ -369,7 +369,7 @@ public void Reidentify(long key)
/// A signed 32-bit integer value which represents coefficient with which combination of weights would be found
/// </param>
public void Reidentify(long key, int coef)
=> this.key = (key ^ coef);
=> this.key = (key^(int)coef);

/// <summary>
/// A string value which represents the designation value of the current shift
Expand All @@ -395,8 +395,7 @@ public void Reidentify(long key, int coef)
/// <returns>
/// A string value which represents the designation value of the current shift
/// </returns>
public override string ToString()
{ return _designation; }
public override string ToString() => _designation;

/// <summary>
/// An instance of <see cref="ISubflow"/> which represents this subflow's instance data
Expand Down
Loading

0 comments on commit 7b7662f

Please sign in to comment.