object B_Spline
Companion object for B_Spline
class provides functions for clamping the
the ends of a spline and running timing benchmarks.
- Alphabetic
- By Inheritance
- B_Spline
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
benchmark[R](reps: Int = 100, useSeconds: Boolean = false, title: String = "benchmark")(block: ⇒ R): R
Gather timing statistics for repeated executions of a block, prints the statistics, and returns the value produced by the block.
Gather timing statistics for repeated executions of a block, prints the statistics, and returns the value produced by the block.
- R
result type of block
- reps
number of replications
- useSeconds
record time as seconds instead of milliseconds (default = false)
- title
title for statistic
- block
block of code to execute
-
def
benchmarked[R](reps: Int = 100, useSeconds: Boolean = false, title: String = "benchmark")(block: ⇒ R): (R, Statistic)
Gather timing statistics for repeated executions of a block and returns a tuple containing the return value produced by the block and the
Statistic
instance used to gather the statistics.Gather timing statistics for repeated executions of a block and returns a tuple containing the return value produced by the block and the
Statistic
instance used to gather the statistics.- R
result type of block
- reps
number of replications
- useSeconds
record time as seconds instead of milliseconds (default = false)
- title
title for statistic
- block
block of code to execute
-
def
clamp(m: Int, t: VectoD, isInclusive: Boolean = true): VectorD
Return a "clamped" version of the input vector, augmented to ensure that each end has
m
-many repeated points.Return a "clamped" version of the input vector, augmented to ensure that each end has
m
-many repeated points. IfisInclusive
is true, then the first and last values of the vector are repeated; otherwise, the valuest(0)-sqrt(EPSILON)
andt(t.dim-1)+sqrt(EPSILON)
are repeated for the beginning and end, respectively.- m
intended B-spline order (degree = m - 1)
- t
non-decreasing vector of time points
- isInclusive
repeat end points (default = true)