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
typedef typename M::mem_manager_type mem_manager_type;
typedef typename M::layout_type layout_type;
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;
};
......@@ -1647,8 +1647,8 @@ namespace dlib
{
typedef long type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
const static long NR = tabs<(end - start)>::value/inc_ + 1;
const static long NC = 1;
const static long NR = 1;
const static long NC = tabs<(end - start)>::value/inc_ + 1;
const static long cost = 1;
typedef row_major_layout layout_type;
};
......@@ -1680,11 +1680,11 @@ namespace dlib
long operator() (
long r,
long c
) const { return start + r*inc; }
) const { return start + c*inc; }
long operator() (
long r
) const { return start + r*inc; }
long c
) const { return start + c*inc; }
template <typename U, long iNR, long iNC , typename MM, typename L>
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