Commit 484d5103 authored by Davis King's avatar Davis King

- Added some tests for the new linspace, logspace, and cartesian_product functions.

  - Updated old tests now that range() gives row vectors instead of column vectors.
  - Fixed a bug in subm() that showed up when statically dimensioned row vectors
    were used to select a sub matrix.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402897
parent 3d559009
...@@ -1009,7 +1009,7 @@ namespace dlib ...@@ -1009,7 +1009,7 @@ namespace dlib
typedef typename M::mem_manager_type mem_manager_type; typedef typename M::mem_manager_type mem_manager_type;
typedef typename M::layout_type layout_type; typedef typename M::layout_type layout_type;
const static long NR = EXPr::NR*EXPr::NC; const static long NR = EXPr::NR*EXPr::NC;
const static long NC = EXPc::NR*EXPr::NC; const static long NC = EXPc::NR*EXPc::NC;
const static long cost = EXPr::cost+EXPc::cost+M::cost; const static long cost = EXPr::cost+EXPc::cost+M::cost;
}; };
...@@ -1647,8 +1647,8 @@ namespace dlib ...@@ -1647,8 +1647,8 @@ namespace dlib
{ {
typedef long type; typedef long type;
typedef memory_manager<char>::kernel_1a mem_manager_type; typedef memory_manager<char>::kernel_1a mem_manager_type;
const static long NR = tabs<(end - start)>::value/inc_ + 1; const static long NR = 1;
const static long NC = 1; const static long NC = tabs<(end - start)>::value/inc_ + 1;
const static long cost = 1; const static long cost = 1;
typedef row_major_layout layout_type; typedef row_major_layout layout_type;
}; };
...@@ -1680,11 +1680,11 @@ namespace dlib ...@@ -1680,11 +1680,11 @@ namespace dlib
long operator() ( long operator() (
long r, long r,
long c long c
) const { return start + r*inc; } ) const { return start + c*inc; }
long operator() ( long operator() (
long r long c
) const { return start + r*inc; } ) const { return start + c*inc; }
template <typename U, long iNR, long iNC , typename MM, typename L> template <typename U, long iNR, long iNC , typename MM, typename L>
bool aliases ( bool aliases (
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment