ortools.math_opt.sparse_containers_pb2

@generated by mypy-protobuf. Do not edit manually! isort:skip_file Copyright 2010-2025 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Data structures used throughout MathOpt to model sparse vectors and matrices.

 1# -*- coding: utf-8 -*-
 2# Generated by the protocol buffer compiler.  DO NOT EDIT!
 3# NO CHECKED-IN PROTOBUF GENCODE
 4# source: ortools/math_opt/sparse_containers.proto
 5# Protobuf Python Version: 6.31.0
 6"""Generated protocol buffer code."""
 7from google.protobuf import descriptor as _descriptor
 8from google.protobuf import descriptor_pool as _descriptor_pool
 9from google.protobuf import runtime_version as _runtime_version
10from google.protobuf import symbol_database as _symbol_database
11from google.protobuf.internal import builder as _builder
12_runtime_version.ValidateProtobufRuntimeVersion(
13    _runtime_version.Domain.PUBLIC,
14    6,
15    31,
16    0,
17    '',
18    'ortools/math_opt/sparse_containers.proto'
19)
20# @@protoc_insertion_point(imports)
21
22_sym_db = _symbol_database.Default()
23
24
25
26
27DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(ortools/math_opt/sparse_containers.proto\x12\x1coperations_research.math_opt\"6\n\x17SparseDoubleVectorProto\x12\x0b\n\x03ids\x18\x01 \x03(\x03\x12\x0e\n\x06values\x18\x02 \x03(\x01\"4\n\x15SparseBoolVectorProto\x12\x0b\n\x03ids\x18\x01 \x03(\x03\x12\x0e\n\x06values\x18\x02 \x03(\x08\"5\n\x16SparseInt32VectorProto\x12\x0b\n\x03ids\x18\x01 \x03(\x03\x12\x0e\n\x06values\x18\x02 \x03(\x05\"`\n\x17SparseVectorFilterProto\x12\x18\n\x10skip_zero_values\x18\x01 \x01(\x08\x12\x15\n\rfilter_by_ids\x18\x02 \x01(\x08\x12\x14\n\x0c\x66iltered_ids\x18\x03 \x03(\x03\"T\n\x17SparseDoubleMatrixProto\x12\x0f\n\x07row_ids\x18\x01 \x03(\x03\x12\x12\n\ncolumn_ids\x18\x02 \x03(\x03\x12\x14\n\x0c\x63oefficients\x18\x03 \x03(\x01\"J\n\x15LinearExpressionProto\x12\x0b\n\x03ids\x18\x01 \x03(\x03\x12\x14\n\x0c\x63oefficients\x18\x02 \x03(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\x42\x1e\n\x1a\x63om.google.ortools.mathoptP\x01\x62\x06proto3')
28
29_globals = globals()
30_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ortools.math_opt.sparse_containers_pb2', _globals)
32if not _descriptor._USE_C_DESCRIPTORS:
33  _globals['DESCRIPTOR']._loaded_options = None
34  _globals['DESCRIPTOR']._serialized_options = b'\n\032com.google.ortools.mathoptP\001'
35  _globals['_SPARSEDOUBLEVECTORPROTO']._serialized_start=74
36  _globals['_SPARSEDOUBLEVECTORPROTO']._serialized_end=128
37  _globals['_SPARSEBOOLVECTORPROTO']._serialized_start=130
38  _globals['_SPARSEBOOLVECTORPROTO']._serialized_end=182
39  _globals['_SPARSEINT32VECTORPROTO']._serialized_start=184
40  _globals['_SPARSEINT32VECTORPROTO']._serialized_end=237
41  _globals['_SPARSEVECTORFILTERPROTO']._serialized_start=239
42  _globals['_SPARSEVECTORFILTERPROTO']._serialized_end=335
43  _globals['_SPARSEDOUBLEMATRIXPROTO']._serialized_start=337
44  _globals['_SPARSEDOUBLEMATRIXPROTO']._serialized_end=421
45  _globals['_LINEAREXPRESSIONPROTO']._serialized_start=423
46  _globals['_LINEAREXPRESSIONPROTO']._serialized_end=497
47# @@protoc_insertion_point(module_scope)
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = <google._upb._message.FileDescriptor object>
class SparseDoubleVectorProto(google._upb._message.Message, google.protobuf.message.Message):

A sparse representation of a vector of doubles.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SparseBoolVectorProto(google._upb._message.Message, google.protobuf.message.Message):

A sparse representation of a vector of bools.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SparseInt32VectorProto(google._upb._message.Message, google.protobuf.message.Message):

A sparse representation of a vector of ints.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SparseVectorFilterProto(google._upb._message.Message, google.protobuf.message.Message):

This message allows to query/set specific parts of a SparseXxxxVector. The default behavior is not to filter out anything. A common usage is to query only parts of solutions (only non-zero values, and/or just a hand-picked set of variable values).

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SparseDoubleMatrixProto(google._upb._message.Message, google.protobuf.message.Message):

A sparse representation of a matrix of doubles.

The matrix is stored as triples of row id, column id, and coefficient. These three vectors must be of equal length. For all i, the tuple (row_ids[i], column_ids[i]) should be distinct. Entries must be in row major order.

TODO(user): consider CSR.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class LinearExpressionProto(google._upb._message.Message, google.protobuf.message.Message):

A sparse representation of a linear expression (a weighted sum of variables, plus a constant offset).

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>