OR-Tools  9.1
sparse_vector_view.h File Reference

Go to the source code of this file.

Classes

class  SparseVectorView< T >
 
class  SparseVectorView< T >::const_iterator
 

Namespaces

namespace  operations_research
 Collection of objects used to extend the Constraint Solver library.
 
namespace  operations_research::math_opt
 

Typedefs

template<typename SparseVector >
using sparse_value_type = typename std::remove_reference< decltype(SparseVector().values())>::type::value_type
 

Functions

template<typename Collection , typename T = typename Collection::value_type>
SparseVectorView< T > MakeView (absl::Span< const int64_t > ids, const Collection &values)
 
template<typename T >
SparseVectorView< const T * > MakeView (const google::protobuf::RepeatedField< int64_t > &ids, const google::protobuf::RepeatedPtrField< T > &values)
 
template<typename SparseVectorProto , typename T = sparse_value_type<SparseVectorProto>>
SparseVectorView< T > MakeView (const SparseVectorProto &sparse_vector)