Skip to content

Commit 469a52e

Browse files
author
Samchon
committed
v1.7.10 Publish
1 parent 68679b4 commit 469a52e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+317
-119
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"email": "[email protected]",
77
"url": "http://samchon.org"
88
},
9-
"version": "1.7.10-dev.20180321",
9+
"version": "1.7.10",
1010
"main": "./lib/tstl.js",
1111
"typings": "./lib/tstl.d.ts",
1212
"scripts": {

src/std/base/containers/AdaptorContainer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
namespace std.base
44
{
55
/**
6-
* @hidden
6+
* Base class for Adaptor Containers.
7+
*
8+
* @author Jeongho Nam <http://samchon.org>
79
*/
810
export abstract class AdaptorContainer<T,
911
Source extends _IEmpty & _ISize & _IPush<T>,

src/std/base/containers/IContainer.ts

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace std.base
2525
(first: InputIterator, last: InputIterator): void;
2626

2727
/**
28-
* Clear elements.
28+
* @inheritDoc
2929
*/
3030
clear(): void;
3131

@@ -50,37 +50,27 @@ namespace std.base
5050
ITERATORS
5151
--------------------------------------------------------- */
5252
/**
53-
* Iterator to the first element.
54-
*
55-
* @return Iterator to the first element.
53+
* @inheritDoc
5654
*/
5755
begin(): IteratorT;
5856

5957
/**
60-
* Iterator to the end.
61-
*
62-
* @return Iterator to the end.
58+
* @inheritDoc
6359
*/
6460
end(): IteratorT;
6561

6662
/**
67-
* Reverse iterator to the first element in reverse.
68-
*
69-
* @return Reverse iterator to the first.
63+
* @inheritDoc
7064
*/
7165
rbegin(): ReverseIteratorT;
7266

7367
/**
74-
* Reverse iterator to the reverse end.
75-
*
76-
* @return Reverse iterator to the end.
68+
* @inheritDoc
7769
*/
7870
rend(): ReverseIteratorT;
7971

8072
/**
81-
* Native function for `for ... of` iteration.
82-
*
83-
* @return For ... of iterator
73+
* @inheritDoc
8474
*/
8575
[Symbol.iterator](): IterableIterator<T>;
8676

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
namespace std.base
22
{
33
/**
4-
* Interface for deque containers.
5-
*
6-
* @author Jeongho Nam <http://samchon.org>
4+
* @hidden
75
*/
8-
export interface IDequeContainer<T,
9-
SourceT extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
10-
IteratorT extends Iterator<T, SourceT, IteratorT, ReverseIteratorT>,
11-
ReverseIteratorT extends ReverseIterator<T, SourceT, IteratorT, ReverseIteratorT>>
12-
extends ILinearContainer<T, SourceT, IteratorT, ReverseIteratorT>
6+
export interface _IDeque<T> extends _IPushFront<T>
137
{
148
/**
15-
* Insert an element at the first.
16-
*
17-
* @param val Value to insert.
9+
* @inheritDoc
1810
*/
1911
push_front(val: T): void;
2012

@@ -23,4 +15,17 @@ namespace std.base
2315
*/
2416
pop_front(): void;
2517
}
18+
19+
/**
20+
* Interface for deque containers.
21+
*
22+
* @author Jeongho Nam <http://samchon.org>
23+
*/
24+
export interface IDequeContainer<T,
25+
SourceT extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
26+
IteratorT extends Iterator<T, SourceT, IteratorT, ReverseIteratorT>,
27+
ReverseIteratorT extends ReverseIterator<T, SourceT, IteratorT, ReverseIteratorT>>
28+
extends ILinearContainer<T, SourceT, IteratorT, ReverseIteratorT>, _IDeque<T>
29+
{
30+
}
2631
}

src/std/base/containers/ILinearContainer.ts

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
namespace std.base
22
{
3+
/**
4+
* @hidden
5+
*/
6+
export interface _IFront<T>
7+
{
8+
/**
9+
* Get the first element.
10+
*
11+
* @return The first element.
12+
*/
13+
front(): T;
14+
15+
/**
16+
* Change the first element.
17+
*
18+
* @param val The value to change.
19+
*/
20+
front(val: T): void;
21+
}
22+
323
/**
424
* Interface for linear containers.
525
*
@@ -9,7 +29,8 @@ namespace std.base
929
SourceT extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
1030
IteratorT extends Iterator<T, SourceT, IteratorT, ReverseIteratorT>,
1131
ReverseIteratorT extends ReverseIterator<T, SourceT, IteratorT, ReverseIteratorT>>
12-
extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>
32+
extends IContainer<T, SourceT, IteratorT, ReverseIteratorT>,
33+
_IPushBack<T>
1334
{
1435
/* ---------------------------------------------------------
1536
CONSTRUCTORS
@@ -41,18 +62,6 @@ namespace std.base
4162
/* ---------------------------------------------------------
4263
ACCESSORS
4364
--------------------------------------------------------- */
44-
/**
45-
* Get the first element.
46-
*
47-
* @return The first element.
48-
*/
49-
front(): T;
50-
51-
/**
52-
* Change the first element.
53-
*/
54-
front(val: T): void;
55-
5665
/**
5766
* Get the last element.
5867
*
@@ -62,16 +71,16 @@ namespace std.base
6271

6372
/**
6473
* Change the last element.
74+
*
75+
* @param val The value to change.
6576
*/
6677
back(val: T): void;
6778

6879
/* ---------------------------------------------------------
6980
ELEMENTS I/O
7081
--------------------------------------------------------- */
7182
/**
72-
* Insert an element at the end.
73-
*
74-
* @param val Value to insert.
83+
* @inheritDoc
7584
*/
7685
push_back(val: T): void;
7786

src/std/base/disposable/IBidirectionalContainer.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@ namespace std.base
88
ReverseIteratorT extends IReverseIterator<T, IteratorT, ReverseIteratorT>>
99
extends IForwardContainer<T, IteratorT>
1010
{
11+
/**
12+
* Reverse iterator to the first element in reverse.
13+
*
14+
* @return Reverse iterator to the first.
15+
*/
1116
rbegin(): ReverseIteratorT;
17+
18+
/**
19+
* Reverse iterator to the reverse end.
20+
*
21+
* @return Reverse iterator to the end.
22+
*/
1223
rend(): ReverseIteratorT;
1324
}
1425
}

src/std/base/disposable/IForwardContainer.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@ namespace std.base
55
*/
66
export interface IForwardContainer<T, Iterator extends IForwardIterator<T, Iterator>>
77
{
8+
/**
9+
* Iterator to the first element.
10+
*
11+
* @return Iterator to the first element.
12+
*/
813
begin(): Iterator;
14+
15+
/**
16+
* Iterator to the end.
17+
*
18+
* @return Iterator to the end.
19+
*/
920
end(): Iterator;
1021
}
1122
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
namespace std.base
2+
{
3+
export interface _IListAlgorithm<T, Source>
4+
{
5+
/* ---------------------------------------------------------
6+
UNIQUE & REMOVE
7+
--------------------------------------------------------- */
8+
/**
9+
* Remove duplicated elements.
10+
*
11+
* @param binary_pred A binary function predicates two arguments are equal. Default is {@link equal_to}.
12+
*/
13+
unique(binary_pred?: (x: T, y: T) => boolean): void;
14+
15+
/**
16+
* Remove elements with specific value.
17+
*
18+
* @param val The value to remove.
19+
*/
20+
remove(val: T): void;
21+
22+
/**
23+
* Remove elements with specific function.
24+
*
25+
* @param pred A unary function determines whether remove or not.
26+
*/
27+
remove_if(pred: (val: T) => boolean): void;
28+
29+
/* ---------------------------------------------------------
30+
SEQUENCE
31+
--------------------------------------------------------- */
32+
/**
33+
* Merge two *sorted* containers.
34+
*
35+
* @param source Source container to transfer.
36+
* @param comp A binary function predicates *x* element would be placed before *y*. When returns `true`, then *x* precedes *y*. Default is {@link less}.
37+
*/
38+
merge(from: Source, comp?: (x: T, y: T) => boolean): void;
39+
40+
/**
41+
* Sort elements.
42+
*
43+
* @param comp A binary function predicates *x* element would be placed before *y*. When returns `true`, then *x* precedes *y*. Default is {@link less}.
44+
*/
45+
sort(comp?: (x: T, y: T) => boolean): void;
46+
47+
/**
48+
* Reverse elements.
49+
*/
50+
reverse(): void;
51+
52+
/**
53+
* Swap elements.
54+
*
55+
* @param obj Target container to swap.
56+
*/
57+
swap(obj: Source): void;
58+
}
59+
}

src/std/base/disposable/IPartialContainers.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ namespace std.base
33
/* ---------------------------------------------------------
44
CAPACITY
55
--------------------------------------------------------- */
6+
/**
7+
* @hidden
8+
*/
9+
export interface _IClear
10+
{
11+
/**
12+
* Clear elements.
13+
*/
14+
clear(): void;
15+
}
16+
617
/**
718
* @hidden
819
*/
@@ -55,6 +66,11 @@ namespace std.base
5566
*/
5667
export interface _IPushFront<T>
5768
{
69+
/**
70+
* Insert an element at the first.
71+
*
72+
* @param val Value to insert.
73+
*/
5874
push_front(val: T): void;
5975
}
6076

@@ -63,6 +79,11 @@ namespace std.base
6379
*/
6480
export interface _IPushBack<T>
6581
{
82+
/**
83+
* Insert an element at the end.
84+
*
85+
* @param val Value to insert.
86+
*/
6687
push_back(val: T): void;
6788
}
6889
}

0 commit comments

Comments
 (0)