Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Oct 31, 2023
1 parent 141307e commit 1f9331d
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions ortools/constraint_solver/csharp/constraint_solver.i
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -125,6 +125,18 @@ PROTECT_FROM_FAILURE(Solver::Fail(), arg1);

// ############ END DUPLICATED CODE BLOCK ############

%template(IntVector) std::vector<int>;
%template(IntVectorVector) std::vector<std::vector<int> >;
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<int64_t>;
%template(Int64VectorVector) std::vector<std::vector<int64_t> >;
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 };

Expand Down Expand Up @@ -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<int>;
%template(IntVectorVector) std::vector<std::vector<int> >;
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<int64_t>;
%template(Int64VectorVector) std::vector<std::vector<int64_t> >;
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 {

Expand Down

0 comments on commit 1f9331d

Please sign in to comment.