diff --git a/ortools/constraint_solver/csharp/constraint_solver.i b/ortools/constraint_solver/csharp/constraint_solver.i index 3eed3a940c1..e9da28f6021 100644 --- a/ortools/constraint_solver/csharp/constraint_solver.i +++ b/ortools/constraint_solver/csharp/constraint_solver.i @@ -28,7 +28,7 @@ using System.Collections.Generic; %include "std_string.i" %include "ortools/base/base.i" -%import "ortools/util/csharp/vector.i" +%include "ortools/util/csharp/vector.i" %include "ortools/util/csharp/proto.i" // We need to forward-declare the proto here, so that PROTO_INPUT involving it @@ -125,6 +125,18 @@ PROTECT_FROM_FAILURE(Solver::Fail(), arg1); // ############ END DUPLICATED CODE BLOCK ############ +%template(IntVector) std::vector; +%template(IntVectorVector) std::vector >; +VECTOR_AS_CSHARP_ARRAY(int, int, int, IntVector); +JAGGED_MATRIX_AS_CSHARP_ARRAY(int, int, int, IntVectorVector); +//REGULAR_MATRIX_AS_CSHARP_ARRAY(int, int, int, IntVectorVector); + +%template(Int64Vector) std::vector; +%template(Int64VectorVector) std::vector >; +VECTOR_AS_CSHARP_ARRAY(int64_t, int64_t, long, Int64Vector); +JAGGED_MATRIX_AS_CSHARP_ARRAY(int64_t, int64_t, long, Int64VectorVector); +//REGULAR_MATRIX_AS_CSHARP_ARRAY(int64_t, int64_t, long, Int64VectorVector); + %apply int64_t * INOUT { int64_t * marker }; %apply int64_t * OUTPUT { int64_t *l, int64_t *u, int64_t *value }; @@ -226,19 +238,6 @@ DEFINE_ARGS_TO_R_CALLBACK( #undef DEFINE_ARGS_TO_R_CALLBACK #undef DEFINE_VOID_TO_STRING_CALLBACK -%template(IntVector) std::vector; -%template(IntVectorVector) std::vector >; -VECTOR_AS_CSHARP_ARRAY(int, int, int, IntVector); -JAGGED_MATRIX_AS_CSHARP_ARRAY(int, int, int, IntVectorVector); -//REGULAR_MATRIX_AS_CSHARP_ARRAY(int, int, int, IntVectorVector); - -%template(Int64Vector) std::vector; -%template(Int64VectorVector) std::vector >; -VECTOR_AS_CSHARP_ARRAY(int64_t, int64_t, long, Int64Vector); -JAGGED_MATRIX_AS_CSHARP_ARRAY(int64_t, int64_t, long, Int64VectorVector); -//REGULAR_MATRIX_AS_CSHARP_ARRAY(int64_t, int64_t, long, Int64VectorVector); - - // RENAMING namespace operations_research {