Naming changes

This commit is contained in:
vun
2022-08-19 15:31:03 +08:00
parent 40b1554fea
commit 5dcd4ce7c5
6 changed files with 62 additions and 62 deletions

View File

@ -7,20 +7,20 @@ using osu.Game.Rulesets.Taiko.Objects;
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
{
/// <summary>
/// Encodes a list of <see cref="MonoEncoding"/>s.
/// <see cref="MonoEncoding"/>s with the same <see cref="MonoEncoding.RunLength"/> are grouped together.
/// Encodes a list of <see cref="MonoStreak"/>s.
/// <see cref="MonoStreak"/>s with the same <see cref="MonoStreak.RunLength"/> are grouped together.
/// </summary>
public class ColourEncoding
public class AlternatingMonoPattern
{
/// <summary>
/// <see cref="MonoEncoding"/>s that are grouped together within this <see cref="ColourEncoding"/>.
/// <see cref="MonoStreak"/>s that are grouped together within this <see cref="AlternatingMonoPattern"/>.
/// </summary>
public readonly List<MonoEncoding> Payload = new List<MonoEncoding>();
public readonly List<MonoStreak> Payload = new List<MonoStreak>();
/// <summary>
/// The parent <see cref="CoupledColourEncoding"/> that contains this <see cref="ColourEncoding"/>
/// The parent <see cref="RepeatingHitPatterns"/> that contains this <see cref="AlternatingMonoPattern"/>
/// </summary>
public CoupledColourEncoding? Parent;
public RepeatingHitPatterns? Parent;
/// <summary>
/// Index of this encoding within it's parent encoding
@ -28,10 +28,10 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
public int Index;
/// <summary>
/// Determine if this <see cref="ColourEncoding"/> is a repetition of another <see cref="ColourEncoding"/>. This
/// Determine if this <see cref="AlternatingMonoPattern"/> is a repetition of another <see cref="AlternatingMonoPattern"/>. This
/// is a strict comparison and is true if and only if the colour sequence is exactly the same.
/// </summary>
public bool IsRepetitionOf(ColourEncoding other)
public bool IsRepetitionOf(AlternatingMonoPattern other)
{
return HasIdenticalMonoLength(other) &&
other.Payload.Count == Payload.Count &&
@ -40,9 +40,9 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
}
/// <summary>
/// Determine if this <see cref="ColourEncoding"/> has the same mono length of another <see cref="ColourEncoding"/>.
/// Determine if this <see cref="AlternatingMonoPattern"/> has the same mono length of another <see cref="AlternatingMonoPattern"/>.
/// </summary>
public bool HasIdenticalMonoLength(ColourEncoding other)
public bool HasIdenticalMonoLength(AlternatingMonoPattern other)
{
return other.Payload[0].RunLength == Payload[0].RunLength;
}

View File

@ -9,19 +9,19 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
{
/// <summary>
/// Encode colour information for a sequence of <see cref="TaikoDifficultyHitObject"/>s. Consecutive <see cref="TaikoDifficultyHitObject"/>s
/// of the same <see cref="HitType"/> are encoded within the same <see cref="MonoEncoding"/>.
/// of the same <see cref="HitType"/> are encoded within the same <see cref="MonoStreak"/>.
/// </summary>
public class MonoEncoding
public class MonoStreak
{
/// <summary>
/// List of <see cref="DifficultyHitObject"/>s that are encoded within this <see cref="MonoEncoding"/>.
/// List of <see cref="DifficultyHitObject"/>s that are encoded within this <see cref="MonoStreak"/>.
/// </summary>
public List<TaikoDifficultyHitObject> EncodedData { get; private set; } = new List<TaikoDifficultyHitObject>();
/// <summary>
/// The parent <see cref="ColourEncoding"/> that contains this <see cref="MonoEncoding"/>
/// The parent <see cref="AlternatingMonoPattern"/> that contains this <see cref="MonoStreak"/>
/// </summary>
public ColourEncoding? Parent;
public AlternatingMonoPattern? Parent;
/// <summary>
/// Index of this encoding within it's parent encoding

View File

@ -7,33 +7,33 @@ using System.Collections.Generic;
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
{
/// <summary>
/// Encodes a list of <see cref="ColourEncoding"/>s, grouped together by back and forth repetition of the same
/// <see cref="ColourEncoding"/>. Also stores the repetition interval between this and the previous <see cref="CoupledColourEncoding"/>.
/// Encodes a list of <see cref="AlternatingMonoPattern"/>s, grouped together by back and forth repetition of the same
/// <see cref="AlternatingMonoPattern"/>. Also stores the repetition interval between this and the previous <see cref="RepeatingHitPatterns"/>.
/// </summary>
public class CoupledColourEncoding
public class RepeatingHitPatterns
{
/// <summary>
/// Maximum amount of <see cref="CoupledColourEncoding"/>s to look back to find a repetition.
/// Maximum amount of <see cref="RepeatingHitPatterns"/>s to look back to find a repetition.
/// </summary>
private const int max_repetition_interval = 16;
/// <summary>
/// The <see cref="ColourEncoding"/>s that are grouped together within this <see cref="CoupledColourEncoding"/>.
/// The <see cref="AlternatingMonoPattern"/>s that are grouped together within this <see cref="RepeatingHitPatterns"/>.
/// </summary>
public readonly List<ColourEncoding> Payload = new List<ColourEncoding>();
public readonly List<AlternatingMonoPattern> Payload = new List<AlternatingMonoPattern>();
/// <summary>
/// The previous <see cref="CoupledColourEncoding"/>. This is used to determine the repetition interval.
/// The previous <see cref="RepeatingHitPatterns"/>. This is used to determine the repetition interval.
/// </summary>
public readonly CoupledColourEncoding? Previous;
public readonly RepeatingHitPatterns? Previous;
/// <summary>
/// How many <see cref="CoupledColourEncoding"/> between the current and previous identical <see cref="CoupledColourEncoding"/>.
/// How many <see cref="RepeatingHitPatterns"/> between the current and previous identical <see cref="RepeatingHitPatterns"/>.
/// If no repetition is found this will have a value of <see cref="max_repetition_interval"/> + 1.
/// </summary>
public int RepetitionInterval { get; private set; } = max_repetition_interval + 1;
public CoupledColourEncoding(CoupledColourEncoding? previous)
public RepeatingHitPatterns(RepeatingHitPatterns? previous)
{
Previous = previous;
}
@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
/// Returns true if other is considered a repetition of this encoding. This is true if other's first two payloads
/// have identical mono lengths.
/// </summary>
private bool isRepetitionOf(CoupledColourEncoding other)
private bool isRepetitionOf(RepeatingHitPatterns other)
{
if (Payload.Count != other.Payload.Count) return false;
@ -55,8 +55,8 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
}
/// <summary>
/// Finds the closest previous <see cref="CoupledColourEncoding"/> that has the identical <see cref="Payload"/>.
/// Interval is defined as the amount of <see cref="CoupledColourEncoding"/> chunks between the current and repeated encoding.
/// Finds the closest previous <see cref="RepeatingHitPatterns"/> that has the identical <see cref="Payload"/>.
/// Interval is defined as the amount of <see cref="RepeatingHitPatterns"/> chunks between the current and repeated encoding.
/// </summary>
public void FindRepetitionInterval()
{
@ -66,7 +66,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
return;
}
CoupledColourEncoding? other = Previous;
RepeatingHitPatterns? other = Previous;
int interval = 1;
while (interval < max_repetition_interval)