Small speed improvement int trim by using stack (and DFS) instead of queue (and BFS) for remove and collapse, finally fix the unknown escape '\*' error

This commit is contained in:
Nathan Braswell
2017-01-25 01:47:05 -05:00
parent 987e6eb9a5
commit caba8b310f
4 changed files with 12 additions and 4 deletions

View File

@@ -24,6 +24,10 @@ obj stack<T> (Object, Serializable) {
data.construct()
return this
}
fun construct(ammt: int): *stack<T> {
data.construct(ammt)
return this
}
fun copy_construct(other: *stack<T>) {
data.copy_construct(&other->data)
}
@@ -59,6 +63,9 @@ obj stack<T> (Object, Serializable) {
fun size(): int {
return data.size
}
fun available(): int {
return data.available
}
fun empty():bool {
return data.size == 0
}