public string DataToString() { string result = ""; result += NumberOfElements.ToString(); result += Spaces(19 - (int)NumberOfElements.ToString().Length); result += "| "; result += BSTInsert.ToString(); result += "ms"; result += Spaces(8 - BSTInsert.ToString().Length); result += "| "; result += LinkedListInsert.ToString(); result += "ms"; result += Spaces(15 - LinkedListInsert.ToString().Length); result += "| "; result += BSTSearch.ToString(); result += "ms"; result += Spaces(8 - BSTSearch.ToString().Length); result += "| "; result += LinkedListSearch.ToString(); result += "ms"; result += Spaces(15 - LinkedListSearch.ToString().Length); result += "| "; result += BSTDestroy.ToString(); result += "ms"; result += Spaces(9 - BSTDestroy.ToString().Length); result += "| "; result += LinkedListDestroy.ToString(); result += "ms"; return(result); }
/// <inheritdoc /> public override uint GetPhysicalLength(MetadataBuffer buffer) { return(sizeof(byte) + NumberOfElements.GetCompressedSize() + sizeof(byte) + base.GetPhysicalLength(buffer)); }
public void XmlWrite(XmlWriter writer) { writer.WriteStartElement(nameof(Batch)); writer.WriteElementString(nameof(Id), Id.ToString()); writer.WriteElementString(nameof(NumberOfElements), NumberOfElements.ToString()); Recipe.XmlWrite(writer); writer.WriteEndElement(); }
public void FirstTest() { // Testing data int[] myTestArray = { 1, 1, 2, 3, 2, 1, 1 }; // Method out int actual = NumberOfElements.NumberCounter(myTestArray, 1); int expected = 4; // Testing Assert.AreEqual(expected, actual); }
public void ThirdTest() { // Testing data int[] myTestArray = { 1, 2, 3, 4, 5, 6, 7 }; // Method out int actual = NumberOfElements.NumberCounter(myTestArray, 1); int expected = 1; // Testing Assert.AreEqual(expected, actual); }
public string DataToString() { string result = ""; result += NumberOfElements.ToString(); result += Spaces(19 - (int)NumberOfElements.ToString().Length); result += "| "; result += BSTHeight.ToString(); result += Spaces(10 - BSTHeight.ToString().Length); result += "| "; result += AVLHeight.ToString(); return(result); }
public override uint GetPhysicalLength() { return(sizeof(byte) + NumberOfElements.GetCompressedSize() + sizeof(byte)); }