Class ProtobufMatrix
java.lang.Object
us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
org.wpilib.math.linalg.proto.detail.ProtobufMatrix
- All Implemented Interfaces:
Cloneable
public final class ProtobufMatrix
extends us.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
implements Cloneable
Protobuf type
ProtobufMatrix-
Field Summary
Fields inherited from class us.hebi.quickbuf.ProtoMessage
bitField0_, cachedSize, unknownBytesFieldName -
Method Summary
Modifier and TypeMethodDescriptionaddAllData(double... values) repeated double data = 3;addData(double value) repeated double data = 3;clear()repeated double data = 3;optional uint32 num_cols = 2;optional uint32 num_rows = 1;clone()protected intcopyFrom(ProtobufMatrix other) booleanus.hebi.quickbuf.RepeatedDoublegetData()repeated double data = 3;This method returns the internal storage object without modifying any has state.static us.hebi.quickbuf.Descriptors.Descriptorstatic us.hebi.quickbuf.MessageFactory<ProtobufMatrix> us.hebi.quickbuf.RepeatedDoublerepeated double data = 3;This method returns the internal storage object and sets the corresponding has state.intoptional uint32 num_cols = 2;intoptional uint32 num_rows = 1;booleanhasData()repeated double data = 3;booleanoptional uint32 num_cols = 2;booleanoptional uint32 num_rows = 1;booleanisEmpty()mergeFrom(ProtobufMatrix other) mergeFrom(us.hebi.quickbuf.JsonSource input) mergeFrom(us.hebi.quickbuf.ProtoSource input) static ProtobufMatrixstatic ProtobufMatrixparseFrom(byte[] data) static ProtobufMatrixparseFrom(us.hebi.quickbuf.JsonSource input) static ProtobufMatrixparseFrom(us.hebi.quickbuf.ProtoSource input) setNumCols(int value) optional uint32 num_cols = 2;setNumRows(int value) optional uint32 num_rows = 1;voidwriteTo(us.hebi.quickbuf.JsonSink output) voidwriteTo(us.hebi.quickbuf.ProtoSink output) Methods inherited from class us.hebi.quickbuf.ProtoMessage
bytesDefaultValue, checkInitialized, getCachedSize, getMissingFields, getMissingFields, getMissingFields, getMissingFields, getSerializedSize, getUnknownBytes, hashCode, isInitialized, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, rethrowFromParent, toByteArray, toByteArray, toByteArray, toString, writeDelimitedTo
-
Method Details
-
newInstance
- Returns:
- a new empty instance of
ProtobufMatrix
-
hasNumRows
public boolean hasNumRows()optional uint32 num_rows = 1;- Returns:
- whether the numRows field is set
-
clearNumRows
-
getNumRows
public int getNumRows()optional uint32 num_rows = 1;- Returns:
- the numRows
-
setNumRows
optional uint32 num_rows = 1;- Parameters:
value- the numRows to set- Returns:
- this
-
hasNumCols
public boolean hasNumCols()optional uint32 num_cols = 2;- Returns:
- whether the numCols field is set
-
clearNumCols
-
getNumCols
public int getNumCols()optional uint32 num_cols = 2;- Returns:
- the numCols
-
setNumCols
optional uint32 num_cols = 2;- Parameters:
value- the numCols to set- Returns:
- this
-
hasData
public boolean hasData()repeated double data = 3;- Returns:
- whether the data field is set
-
clearData
-
getData
public us.hebi.quickbuf.RepeatedDouble getData()repeated double data = 3;This method returns the internal storage object without modifying any has state. The returned object should not be modified and be treated as read-only. UsegetMutableData()if you want to modify it.- Returns:
- internal storage object for reading
-
getMutableData
public us.hebi.quickbuf.RepeatedDouble getMutableData()repeated double data = 3;This method returns the internal storage object and sets the corresponding has state. The returned object will become part of this message and its contents may be modified as long as the has state is not cleared.- Returns:
- internal storage object for modifications
-
addData
repeated double data = 3;- Parameters:
value- the data to add- Returns:
- this
-
addAllData
repeated double data = 3;- Parameters:
values- the data to add- Returns:
- this
-
copyFrom
- Specified by:
copyFromin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
mergeFrom
- Overrides:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
clear
- Specified by:
clearin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
clearQuick
- Overrides:
clearQuickin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
equals
- Specified by:
equalsin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
writeTo
- Specified by:
writeToin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>- Throws:
IOException
-
computeSerializedSize
protected int computeSerializedSize()- Specified by:
computeSerializedSizein classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
mergeFrom
- Specified by:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>- Throws:
IOException
-
writeTo
- Overrides:
writeToin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>- Throws:
IOException
-
mergeFrom
- Overrides:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>- Throws:
IOException
-
clone
- Specified by:
clonein classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classus.hebi.quickbuf.ProtoMessage<ProtobufMatrix>
-
parseFrom
public static ProtobufMatrix parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException - Throws:
us.hebi.quickbuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
- Throws:
IOException
-
getFactory
- Returns:
- factory for creating ProtobufMatrix messages
-
getDescriptor
public static us.hebi.quickbuf.Descriptors.Descriptor getDescriptor()- Returns:
- this type's descriptor.
-