Skip to content

Commit

Permalink
VNL 2020-11-20 (3d3e8683)
Browse files Browse the repository at this point in the history
Run the UpdateFromUpstream.sh script to extract upstream VNL
using the following shell commands.

$ git archive --prefix=upstream-vnl/ 3d3e8683 -- 
      CMakeLists.txt
      config/cmake
      core/CMakeLists.txt
      core/testlib
      core/vnl
      core/vxl_config.h.in
      core/vxl_copyright.h
      core/vxl_version.h
      v3p/CMakeLists.txt
      v3p/netlib
      vcl
 | tar x
$ git shortlog --perl-regexp --author='^((?!Kitware Robot).*)$' --no-merges --abbrev=8 --format='%h %s' a302a89b..3d3e8683

Drew Gilliam (3):
      869d8c77 contrib/brl - update vxl_configure_file locations, and add HEADER_BINARY_DIR to vxl_add_library for appropriate BUILD_INTERFACE on targets
      38e108cf bvgl_algo - use brl_resource_file for bvgl_eulerspiral_lookup_table resource
      7437c02b bsgm_prob_pairwise_dsm bug fix - favor std::is_same over other methods for template type discovery

Hans Johnson (2):
      f5c93ed9 ENH: Add front() and back() members to vnl_vector and vnl_vector_fixed
      3d3e8683 DOC: Grammer change in comment

Joseph Mundy (14):
      c320d11e templated appearance over input image type
      ad1ab6b0 modify bsgm to handle 16 bit input images
      c9e57958 added 2x processing
      a63bf124 remove debug statements
      bded9867 modified scale for 11 bits vs 8 bits
      5adc3edd restructure 16 bit dynamic range interface
      b16e0d25 added print for dynamic range setting
      7c2914c7 add comments and a few cleanups
      03ef4efe moved error checking .h to dispairity estimator .h
      5524102f add include for <limits>
      cb439258 fixed duplicate scale_0 in prob_pairwise
      596e40a9 add grid index for float data
      57f3d9b1 add .h file
      d4acae8a fix inconsistent pointset append cases

Noah Johnson (1):
      dd42c4fa ENH: vgl_io_pointset_3d (#809)

Tim Cootes (3):
      31bd3efa Added option
      f8c7778b Added line styles
      15d4a216 Added option to save separate frames

Change-Id: I8a2d3efb415942488161724a6a3880b3a7032e13
  • Loading branch information
VXL Maintainers authored and hjmjohnson committed Nov 21, 2020
1 parent 445bc72 commit 29caa5a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Modules/ThirdParty/VNL/src/vxl/core/vnl/tests/test_vector.cxx
Expand Up @@ -18,6 +18,14 @@ test_common_interface()

const typename TContainer::element_type l_values[4] = { 0, 1, 2, 3 };
TContainer l(4, 4, l_values);
TEST("l.front()", l.front() , 0);
TEST("l.back()", l.back() , 3);

const TContainer l_const(4, 4, l_values);

TEST("l_const.front()", l_const.front() , 0);
TEST("l_const.back()", l_const.back() , 3);

TContainer l_swap(l);
TContainer l_std_swap(l);

Expand All @@ -33,6 +41,7 @@ test_common_interface()
std::swap(l_std_swap, r_std_swap);
TEST("std::swap left-right", l.is_equal(r_std_swap, 10e-6), true);
TEST("std::swap right-left", r.is_equal(l_std_swap, 10e-6), true);

}


Expand Down
Expand Up @@ -44,10 +44,20 @@ test_vector_fixed_ref()
// << static_cast<void *>(rval_initialized_independant_matrix.data_block()) << "\n";
}

enum
constexpr size_t size = 4;

{
vnl_vector_fixed<unsigned int, size> test_front_back{11, 22, 33, 44};
TEST("test_front_back.front()", test_front_back.front() , 11);
TEST("test_front_back.back()", test_front_back.back() , 44);
}

{
size = 4
};
const vnl_vector_fixed<unsigned int, size> test_front_back_const{11, 22, 33, 44};
TEST("test_front_back_const.front()", test_front_back_const.front() , 11);
TEST("test_front_back_const.back()", test_front_back_const.back() , 44);
}

typedef vnl_vector_fixed<double, size> vf;
typedef vnl_vector_fixed_ref<double, size> vfr;
typedef vnl_vector_fixed_ref_const<double, size> vfrc;
Expand Down
10 changes: 10 additions & 0 deletions Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_vector.h
Expand Up @@ -293,6 +293,16 @@ class VNL_EXPORT vnl_vector
//: Iterator pointing to element beyond end of data
const_iterator end() const { return data+num_elmts; }

//: Analogous to std::vector::front().
T& front() { return *data; }
//: Analogous to std::vector::back().
T& back() { return data[num_elmts - 1]; }

//: Analogous to std::vector::front() (const overload).
const T& front() const { return *data; }
//: Analogous to std::vector::back() (const overload).
const T& back() const { return data[num_elmts - 1]; }

//: Return a reference to this.
// Useful in code which would prefer not to know if its argument
// is a vector, vector_ref or a vector_fixed. Note that it doesn't
Expand Down
9 changes: 9 additions & 0 deletions Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_vector_fixed.h
Expand Up @@ -301,6 +301,15 @@ class VNL_EXPORT vnl_vector_fixed
//: Iterator pointing to element beyond end of data
const_iterator end() const { return data_+n; }

//: Analogous to std::array::front().
T& front() { return *data_; }
//: Analogous to std::array::back().
T& back() { return data_[n - 1]; }

//: Analogous to std::array::front() (const overload).
const T& front() const { return *data_; }
//: Analogous to std::array::back() (const overload).
const T& back() const { return data_[n - 1]; }

//: Apply f to each element.
// Returns a new vector with the result.
Expand Down

0 comments on commit 29caa5a

Please sign in to comment.