Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.SparsePermutationProto.Builder Class Reference

Detailed Description

A permutation of integers encoded as a list of cycles, hence the "sparse"
format. The image of an element cycle[i] is cycle[(i + 1) % cycle_length].

Protobuf type operations_research.sat.SparsePermutationProto

Definition at line 337 of file SparsePermutationProto.java.

Inheritance diagram for com.google.ortools.sat.SparsePermutationProto.Builder:
com.google.ortools.sat.SparsePermutationProtoOrBuilder

Public Member Functions

Builder clear ()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
com.google.ortools.sat.SparsePermutationProto getDefaultInstanceForType ()
com.google.ortools.sat.SparsePermutationProto build ()
com.google.ortools.sat.SparsePermutationProto buildPartial ()
Builder mergeFrom (com.google.protobuf.Message other)
Builder mergeFrom (com.google.ortools.sat.SparsePermutationProto other)
final boolean isInitialized ()
Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.util.List< java.lang.Integer > getSupportList ()
int getSupportCount ()
int getSupport (int index)
Builder setSupport (int index, int value)
Builder addSupport (int value)
Builder addAllSupport (java.lang.Iterable<? extends java.lang.Integer > values)
Builder clearSupport ()
java.util.List< java.lang.Integer > getCycleSizesList ()
int getCycleSizesCount ()
int getCycleSizes (int index)
Builder setCycleSizes (int index, int value)
Builder addCycleSizes (int value)
Builder addAllCycleSizes (java.lang.Iterable<? extends java.lang.Integer > values)
Builder clearCycleSizes ()

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()

Protected Member Functions

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()

Member Function Documentation

◆ addAllCycleSizes()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.addAllCycleSizes ( java.lang.Iterable<? extends java.lang.Integer > values)

repeated int32 cycle_sizes = 2;

Parameters
valuesThe cycleSizes to add.
Returns
This builder for chaining.

Definition at line 705 of file SparsePermutationProto.java.

◆ addAllSupport()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.addAllSupport ( java.lang.Iterable<? extends java.lang.Integer > values)
Each cycle is listed one after the other in the support field.
The size of each cycle is given (in order) in the cycle_sizes field.

repeated int32 support = 1;

Parameters
valuesThe support to add.
Returns
This builder for chaining.

Definition at line 616 of file SparsePermutationProto.java.

◆ addCycleSizes()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.addCycleSizes ( int value)

repeated int32 cycle_sizes = 2;

Parameters
valueThe cycleSizes to add.
Returns
This builder for chaining.

Definition at line 692 of file SparsePermutationProto.java.

◆ addSupport()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.addSupport ( int value)
Each cycle is listed one after the other in the support field.
The size of each cycle is given (in order) in the cycle_sizes field.

repeated int32 support = 1;

Parameters
valueThe support to add.
Returns
This builder for chaining.

Definition at line 598 of file SparsePermutationProto.java.

◆ build()

com.google.ortools.sat.SparsePermutationProto com.google.ortools.sat.SparsePermutationProto.Builder.build ( )

Definition at line 385 of file SparsePermutationProto.java.

◆ buildPartial()

com.google.ortools.sat.SparsePermutationProto com.google.ortools.sat.SparsePermutationProto.Builder.buildPartial ( )

Definition at line 394 of file SparsePermutationProto.java.

◆ clear()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.clear ( )

Definition at line 365 of file SparsePermutationProto.java.

◆ clearCycleSizes()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.clearCycleSizes ( )

repeated int32 cycle_sizes = 2;

Returns
This builder for chaining.

Definition at line 718 of file SparsePermutationProto.java.

◆ clearSupport()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.clearSupport ( )
Each cycle is listed one after the other in the support field.
The size of each cycle is given (in order) in the cycle_sizes field.

repeated int32 support = 1;

Returns
This builder for chaining.

Definition at line 634 of file SparsePermutationProto.java.

◆ getCycleSizes()

int com.google.ortools.sat.SparsePermutationProto.Builder.getCycleSizes ( int index)

repeated int32 cycle_sizes = 2;

Parameters
indexThe index of the element to return.
Returns
The cycleSizes at the given index.

Implements com.google.ortools.sat.SparsePermutationProtoOrBuilder.

Definition at line 669 of file SparsePermutationProto.java.

◆ getCycleSizesCount()

int com.google.ortools.sat.SparsePermutationProto.Builder.getCycleSizesCount ( )

repeated int32 cycle_sizes = 2;

Returns
The count of cycleSizes.

Implements com.google.ortools.sat.SparsePermutationProtoOrBuilder.

Definition at line 661 of file SparsePermutationProto.java.

◆ getCycleSizesList()

java.util.List< java.lang.Integer > com.google.ortools.sat.SparsePermutationProto.Builder.getCycleSizesList ( )

repeated int32 cycle_sizes = 2;

Returns
A list containing the cycleSizes.

Implements com.google.ortools.sat.SparsePermutationProtoOrBuilder.

Definition at line 653 of file SparsePermutationProto.java.

◆ getDefaultInstanceForType()

com.google.ortools.sat.SparsePermutationProto com.google.ortools.sat.SparsePermutationProto.Builder.getDefaultInstanceForType ( )

Definition at line 380 of file SparsePermutationProto.java.

◆ getDescriptor()

final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.SparsePermutationProto.Builder.getDescriptor ( )
static

Definition at line 342 of file SparsePermutationProto.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.SparsePermutationProto.Builder.getDescriptorForType ( )

Definition at line 375 of file SparsePermutationProto.java.

◆ getSupport()

int com.google.ortools.sat.SparsePermutationProto.Builder.getSupport ( int index)
Each cycle is listed one after the other in the support field.
The size of each cycle is given (in order) in the cycle_sizes field.

repeated int32 support = 1;

Parameters
indexThe index of the element to return.
Returns
The support at the given index.

Implements com.google.ortools.sat.SparsePermutationProtoOrBuilder.

Definition at line 565 of file SparsePermutationProto.java.

◆ getSupportCount()

int com.google.ortools.sat.SparsePermutationProto.Builder.getSupportCount ( )
Each cycle is listed one after the other in the support field.
The size of each cycle is given (in order) in the cycle_sizes field.

repeated int32 support = 1;

Returns
The count of support.

Implements com.google.ortools.sat.SparsePermutationProtoOrBuilder.

Definition at line 552 of file SparsePermutationProto.java.

◆ getSupportList()

java.util.List< java.lang.Integer > com.google.ortools.sat.SparsePermutationProto.Builder.getSupportList ( )
Each cycle is listed one after the other in the support field.
The size of each cycle is given (in order) in the cycle_sizes field.

repeated int32 support = 1;

Returns
A list containing the support.

Implements com.google.ortools.sat.SparsePermutationProtoOrBuilder.

Definition at line 539 of file SparsePermutationProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.ortools.sat.SparsePermutationProto.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 348 of file SparsePermutationProto.java.

◆ isInitialized()

final boolean com.google.ortools.sat.SparsePermutationProto.Builder.isInitialized ( )

Definition at line 453 of file SparsePermutationProto.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.sat.SparsePermutationProto.Builder.mergeFrom ( com.google.ortools.sat.SparsePermutationProto other)

Definition at line 423 of file SparsePermutationProto.java.

◆ mergeFrom() [2/3]

Builder com.google.ortools.sat.SparsePermutationProto.Builder.mergeFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException

Definition at line 458 of file SparsePermutationProto.java.

◆ mergeFrom() [3/3]

Builder com.google.ortools.sat.SparsePermutationProto.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 414 of file SparsePermutationProto.java.

◆ setCycleSizes()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.setCycleSizes ( int index,
int value )

repeated int32 cycle_sizes = 2;

Parameters
indexThe index to set the value at.
valueThe cycleSizes to set.
Returns
This builder for chaining.

Definition at line 678 of file SparsePermutationProto.java.

◆ setSupport()

Builder com.google.ortools.sat.SparsePermutationProto.Builder.setSupport ( int index,
int value )
Each cycle is listed one after the other in the support field.
The size of each cycle is given (in order) in the cycle_sizes field.

repeated int32 support = 1;

Parameters
indexThe index to set the value at.
valueThe support to set.
Returns
This builder for chaining.

Definition at line 579 of file SparsePermutationProto.java.


The documentation for this class was generated from the following file: