Skip to content

Commit

Permalink
v1.7.10 Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Samchon committed Mar 22, 2018
1 parent 68679b4 commit 469a52e
Show file tree
Hide file tree
Showing 43 changed files with 317 additions and 119 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"email": "samchon@samchon.org",
"url": "http://samchon.org"
},
"version": "1.7.10-dev.20180321",
"version": "1.7.10",
"main": "./lib/tstl.js",
"typings": "./lib/tstl.d.ts",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/std/base/containers/AdaptorContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace std.base
{
/**
* @hidden
* Base class for Adaptor Containers.
*
* @author Jeongho Nam <http://samchon.org>
*/
export abstract class AdaptorContainer<T,
Source extends _IEmpty & _ISize & _IPush<T>,
Expand Down
22 changes: 6 additions & 16 deletions src/std/base/containers/IContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace std.base
(first: InputIterator, last: InputIterator): void;

/**
* Clear elements.
* @inheritDoc
*/
clear(): void;

Expand All @@ -50,37 +50,27 @@ namespace std.base
ITERATORS
--------------------------------------------------------- */
/**
* Iterator to the first element.
*
* @return Iterator to the first element.
* @inheritDoc
*/
begin(): IteratorT;

/**
* Iterator to the end.
*
* @return Iterator to the end.
* @inheritDoc
*/
end(): IteratorT;

/**
* Reverse iterator to the first element in reverse.
*
* @return Reverse iterator to the first.
* @inheritDoc
*/
rbegin(): ReverseIteratorT;

/**
* Reverse iterator to the reverse end.
*
* @return Reverse iterator to the end.
* @inheritDoc
*/
rend(): ReverseIteratorT;

/**
* Native function for `for ... of` iteration.
*
* @return For ... of iterator
* @inheritDoc
*/
[Symbol.iterator](): IterableIterator<T>;

Expand Down
27 changes: 16 additions & 11 deletions src/std/base/containers/IDequeContainer.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
namespace std.base
{
/**
* Interface for deque containers.
*
* @author Jeongho Nam <http://samchon.org>
* @hidden
*/
export interface IDequeContainer<T,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
IteratorT extends Iterator<T, SourceT, IteratorT, ReverseIteratorT>,
ReverseIteratorT extends ReverseIterator<T, SourceT, IteratorT, ReverseIteratorT>>
extends ILinearContainer<T, SourceT, IteratorT, ReverseIteratorT>
export interface _IDeque<T> extends _IPushFront<T>
{
/**
* Insert an element at the first.
*
* @param val Value to insert.
* @inheritDoc
*/
push_front(val: T): void;

Expand All @@ -23,4 +15,17 @@ namespace std.base
*/
pop_front(): void;
}

/**
* Interface for deque containers.
*
* @author Jeongho Nam <http://samchon.org>
*/
export interface IDequeContainer<T,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
IteratorT extends Iterator<T, SourceT, IteratorT, ReverseIteratorT>,
ReverseIteratorT extends ReverseIterator<T, SourceT, IteratorT, ReverseIteratorT>>
extends ILinearContainer<T, SourceT, IteratorT, ReverseIteratorT>, _IDeque<T>
{
}
}
41 changes: 25 additions & 16 deletions src/std/base/containers/ILinearContainer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
namespace std.base
{
/**
* @hidden
*/
export interface _IFront<T>
{
/**
* Get the first element.
*
* @return The first element.
*/
front(): T;

/**
* Change the first element.
*
* @param val The value to change.
*/
front(val: T): void;
}

/**
* Interface for linear containers.
*
Expand All @@ -9,7 +29,8 @@ namespace std.base
SourceT extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
IteratorT extends Iterator<T, SourceT, IteratorT, ReverseIteratorT>,
ReverseIteratorT extends ReverseIterator<T, SourceT, IteratorT, ReverseIteratorT>>
extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>
extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
_IPushBack<T>
{
/* ---------------------------------------------------------
CONSTRUCTORS
Expand Down Expand Up @@ -41,18 +62,6 @@ namespace std.base
/* ---------------------------------------------------------
ACCESSORS
--------------------------------------------------------- */
/**
* Get the first element.
*
* @return The first element.
*/
front(): T;

/**
* Change the first element.
*/
front(val: T): void;

/**
* Get the last element.
*
Expand All @@ -62,16 +71,16 @@ namespace std.base

/**
* Change the last element.
*
* @param val The value to change.
*/
back(val: T): void;

/* ---------------------------------------------------------
ELEMENTS I/O
--------------------------------------------------------- */
/**
* Insert an element at the end.
*
* @param val Value to insert.
* @inheritDoc
*/
push_back(val: T): void;

Expand Down
11 changes: 11 additions & 0 deletions src/std/base/disposable/IBidirectionalContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ namespace std.base
ReverseIteratorT extends IReverseIterator<T, IteratorT, ReverseIteratorT>>
extends IForwardContainer<T, IteratorT>
{
/**
* Reverse iterator to the first element in reverse.
*
* @return Reverse iterator to the first.
*/
rbegin(): ReverseIteratorT;

/**
* Reverse iterator to the reverse end.
*
* @return Reverse iterator to the end.
*/
rend(): ReverseIteratorT;
}
}
11 changes: 11 additions & 0 deletions src/std/base/disposable/IForwardContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ namespace std.base
*/
export interface IForwardContainer<T, Iterator extends IForwardIterator<T, Iterator>>
{
/**
* Iterator to the first element.
*
* @return Iterator to the first element.
*/
begin(): Iterator;

/**
* Iterator to the end.
*
* @return Iterator to the end.
*/
end(): Iterator;
}
}
59 changes: 59 additions & 0 deletions src/std/base/disposable/IListAlgorithm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
namespace std.base
{
export interface _IListAlgorithm<T, Source>
{
/* ---------------------------------------------------------
UNIQUE & REMOVE
--------------------------------------------------------- */
/**
* Remove duplicated elements.
*
* @param binary_pred A binary function predicates two arguments are equal. Default is {@link equal_to}.
*/
unique(binary_pred?: (x: T, y: T) => boolean): void;

/**
* Remove elements with specific value.
*
* @param val The value to remove.
*/
remove(val: T): void;

/**
* Remove elements with specific function.
*
* @param pred A unary function determines whether remove or not.
*/
remove_if(pred: (val: T) => boolean): void;

/* ---------------------------------------------------------
SEQUENCE
--------------------------------------------------------- */
/**
* Merge two *sorted* containers.
*
* @param source Source container to transfer.
* @param comp A binary function predicates *x* element would be placed before *y*. When returns `true`, then *x* precedes *y*. Default is {@link less}.
*/
merge(from: Source, comp?: (x: T, y: T) => boolean): void;

/**
* Sort elements.
*
* @param comp A binary function predicates *x* element would be placed before *y*. When returns `true`, then *x* precedes *y*. Default is {@link less}.
*/
sort(comp?: (x: T, y: T) => boolean): void;

/**
* Reverse elements.
*/
reverse(): void;

/**
* Swap elements.
*
* @param obj Target container to swap.
*/
swap(obj: Source): void;
}
}
21 changes: 21 additions & 0 deletions src/std/base/disposable/IPartialContainers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ namespace std.base
/* ---------------------------------------------------------
CAPACITY
--------------------------------------------------------- */
/**
* @hidden
*/
export interface _IClear
{
/**
* Clear elements.
*/
clear(): void;
}

/**
* @hidden
*/
Expand Down Expand Up @@ -55,6 +66,11 @@ namespace std.base
*/
export interface _IPushFront<T>
{
/**
* Insert an element at the first.
*
* @param val Value to insert.
*/
push_front(val: T): void;
}

Expand All @@ -63,6 +79,11 @@ namespace std.base
*/
export interface _IPushBack<T>
{
/**
* Insert an element at the end.
*
* @param val Value to insert.
*/
push_back(val: T): void;
}
}
Loading

0 comments on commit 469a52e

Please sign in to comment.