Comparing version 0.0.6 to 0.0.7
@@ -150,3 +150,3 @@ import { Vector } from "../../container/Vector"; | ||
for (let i: number = 0; i < bucket.size(); ++i) | ||
for (let i: usize = 0; i < bucket.size(); ++i) | ||
if (bucket.at(i) === val) | ||
@@ -153,0 +153,0 @@ { |
@@ -0,3 +1,6 @@ | ||
import { Vector } from "../../container/Vector"; | ||
export namespace CMath | ||
{ | ||
@inline() | ||
export function min<T>(x: T, y: T): T | ||
@@ -8,2 +11,3 @@ { | ||
@inline() | ||
export function max<T>(x: T, y: T): T | ||
@@ -13,2 +17,12 @@ { | ||
} | ||
@inline() | ||
export function factorial(k: usize): usize | ||
{ | ||
if (FACTORIALS.size() <= k) | ||
for (let i: usize = FACTORIALS.size(); i <= k; ++i) | ||
FACTORIALS.push_back(FACTORIALS.at(i - 1) * i); | ||
return FACTORIALS.at(k); | ||
} | ||
const FACTORIALS: Vector<usize> = new Vector(); | ||
} |
@@ -6,2 +6,3 @@ export * from "./algorithm"; | ||
export * from "./iterator"; | ||
export * from "./numeric"; | ||
export * from "./utility"; | ||
@@ -8,0 +9,0 @@ |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"main": "./index.ts", | ||
@@ -12,0 +12,0 @@ "scripts": { |
@@ -5,2 +5,4 @@ # AssemblyScript Standard Template Library | ||
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/astl/blob/master/LICENSE) | ||
[![npm version](https://badge.fury.io/js/astl.svg)](https://www.npmjs.com/package/astl) | ||
[![Downloads](https://img.shields.io/npm/dm/astl.svg)](https://www.npmjs.com/package/astl) | ||
[![Build Status](https://github.com/samchon/astl/workflows/build/badge.svg)](https://github.com/samchon/astl/actions?query=workflow%3Abuild) | ||
@@ -53,15 +55,15 @@ | ||
### Algorithms | ||
`<algorithm>` | ||
- binary_search | ||
- heap | ||
- iterations | ||
- mathematics | ||
- merge | ||
- modifiers | ||
- partition | ||
- sorting | ||
- union_set | ||
- `<algorithm>` | ||
- *binary_search* | ||
- *heap* | ||
- *iterations* | ||
- *mathematics* | ||
- *merge* | ||
- *modifiers* | ||
- *partition* | ||
- *sorting* | ||
- *union_set* | ||
### Functors | ||
`<exception>` | ||
- `<exception>` | ||
- Exception | ||
@@ -73,7 +75,11 @@ - LogicError | ||
- *hash* | ||
- `<numeric>` | ||
- *operators* | ||
- *operations* | ||
- *special_math* | ||
- `<utility>` | ||
## Installation | ||
@@ -80,0 +86,0 @@ ### NPM Module |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
310941
125
8648
109