mlpack
Functions
math_test.cpp File Reference
#include <mlpack/core/math/clamp.hpp>
#include <mlpack/core/math/random.hpp>
#include <mlpack/core/math/range.hpp>
#include "catch.hpp"
#include "test_catch_tools.hpp"
Include dependency graph for math_test.cpp:

Functions

 TEST_CASE ("RangeEmptyConstructor", "[MathTest]")
 Verify that the empty constructor creates an empty range.
 
 TEST_CASE ("RangePointConstructor", "[MathTest]")
 Verify that the point constructor correctly creates a range that is just a point.
 
 TEST_CASE ("RangeConstructor", "[MathTest]")
 Verify that the range constructor correctly creates the range.
 
 TEST_CASE ("RangeWidth", "[MathTest]")
 Test that we get the width correct.
 
 TEST_CASE ("RangeMidpoint", "[MathTest]")
 Test that we get the midpoint correct.
 
 TEST_CASE ("RangeIncludeOther", "[MathTest]")
 Test that we can expand to include other ranges correctly.
 
 TEST_CASE ("RangeIntersectOther", "[MathTest]")
 Test that we can 'and' ranges correctly.
 
 TEST_CASE ("RangeMultiply", "[MathTest]")
 Test multiplication of a range with a double.
 
 TEST_CASE ("RangeEquality", "[MathTest]")
 Test equality operator.
 
 TEST_CASE ("RangeInequality", "[MathTest]")
 Test inequality operator.
 
 TEST_CASE ("RangeStrictLessThan", "[MathTest]")
 Test strict less-than operator.
 
 TEST_CASE ("RangeStrictGreaterThan", "[MathTest]")
 Test strict greater-than operator.
 
 TEST_CASE ("RangeContains", "[MathTest]")
 Test the Contains() operator.
 
 TEST_CASE ("RangeContainsRange", "[MathTest]")
 Test that Range::Contains() works on other Ranges. More...
 
 TEST_CASE ("ShuffleTest", "[MathTest]")
 Make sure shuffling data works.
 
 TEST_CASE ("SparseShuffleTest", "[MathTest]")
 Make sure shuffling sparse data works.
 
 TEST_CASE ("CubeShuffleTest", "[MathTest]")
 Make sure shuffling cubes works.
 
 TEST_CASE ("ShuffleWeightsTest", "[MathTest]")
 Make sure shuffling data with weights works.
 
 TEST_CASE ("SparseShuffleWeightsTest", "[MathTest]")
 Make sure shuffling sparse data with weights works.
 
 TEST_CASE ("InplaceShuffleTest", "[MathTest]")
 Make sure shuffling data works when the same matrices are given as input and output.
 
 TEST_CASE ("InplaceSparseShuffleTest", "[MathTest]")
 Make sure shuffling sparse data works when the input and output matrices are the same.
 
 TEST_CASE ("InplaceCubeShuffleTest", "[MathTest]")
 Make sure shuffling cubes works when the input and output cubes are the same.
 
 TEST_CASE ("InplaceShuffleWeightsTest", "[MathTest]")
 Make sure shuffling data with weights works when the same matrices are given as input and output.
 
 TEST_CASE ("InplaceSparseShuffleWeightsTest", "[MathTest]")
 Make sure shuffling sparse data with weights works when the input and output matrices are the same.
 

Detailed Description

Author
Ryan Curtin

Tests for everything in the math:: namespace.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Function Documentation

◆ TEST_CASE()

TEST_CASE ( "RangeContainsRange"  ,
""  [MathTest] 
)

Test that Range::Contains() works on other Ranges.

It should return false unless the ranges overlap at all.