Package edu.wpi.first.math.proto
Class Wpimath.ProtobufMatrix
java.lang.Object
us.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
edu.wpi.first.math.proto.Wpimath.ProtobufMatrix
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- Wpimath
public static final class Wpimath.ProtobufMatrix
extends us.hebi.quickbuf.ProtoMessage<Wpimath.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 int
copyFrom
(Wpimath.ProtobufMatrix other) boolean
us.hebi.quickbuf.RepeatedDouble
getData()
repeated double data = 3;
This method returns the internal storage object without modifying any has state.static us.hebi.quickbuf.Descriptors.Descriptor
static us.hebi.quickbuf.MessageFactory<Wpimath.ProtobufMatrix>
us.hebi.quickbuf.RepeatedDouble
repeated double data = 3;
This method returns the internal storage object and sets the corresponding has state.int
optional uint32 num_cols = 2;
int
optional uint32 num_rows = 1;
boolean
hasData()
repeated double data = 3;
boolean
optional uint32 num_cols = 2;
boolean
optional uint32 num_rows = 1;
boolean
isEmpty()
mergeFrom
(Wpimath.ProtobufMatrix other) mergeFrom
(us.hebi.quickbuf.JsonSource input) mergeFrom
(us.hebi.quickbuf.ProtoSource input) static Wpimath.ProtobufMatrix
static Wpimath.ProtobufMatrix
parseFrom
(byte[] data) static Wpimath.ProtobufMatrix
parseFrom
(us.hebi.quickbuf.JsonSource input) static Wpimath.ProtobufMatrix
parseFrom
(us.hebi.quickbuf.ProtoSource input) setNumCols
(int value) optional uint32 num_cols = 2;
setNumRows
(int value) optional uint32 num_rows = 1;
void
writeTo
(us.hebi.quickbuf.JsonSink output) void
writeTo
(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
optional uint32 num_rows = 1;
- Returns:
- whether the numRows field is set
-
clearNumRows
optional uint32 num_rows = 1;
- Returns:
- this
-
getNumRows
optional uint32 num_rows = 1;
- Returns:
- the numRows
-
setNumRows
optional uint32 num_rows = 1;
- Parameters:
value
- the numRows to set- Returns:
- this
-
hasNumCols
optional uint32 num_cols = 2;
- Returns:
- whether the numCols field is set
-
clearNumCols
optional uint32 num_cols = 2;
- Returns:
- this
-
getNumCols
optional uint32 num_cols = 2;
- Returns:
- the numCols
-
setNumCols
optional uint32 num_cols = 2;
- Parameters:
value
- the numCols to set- Returns:
- this
-
hasData
repeated double data = 3;
- Returns:
- whether the data field is set
-
clearData
repeated double data = 3;
- Returns:
- this
-
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
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:
copyFrom
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
mergeFrom
- Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
clear
- Specified by:
clear
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
clearQuick
- Overrides:
clearQuick
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
equals
- Specified by:
equals
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
writeTo
- Specified by:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
- Throws:
IOException
-
computeSerializedSize
- Specified by:
computeSerializedSize
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
mergeFrom
- Specified by:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
- Throws:
IOException
-
writeTo
- Overrides:
writeTo
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
- Throws:
IOException
-
mergeFrom
- Overrides:
mergeFrom
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
- Throws:
IOException
-
clone
- Specified by:
clone
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
isEmpty
- Overrides:
isEmpty
in classus.hebi.quickbuf.ProtoMessage<Wpimath.ProtobufMatrix>
-
parseFrom
public static Wpimath.ProtobufMatrix parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException - Throws:
us.hebi.quickbuf.InvalidProtocolBufferException
-
parseFrom
public static Wpimath.ProtobufMatrix parseFrom(us.hebi.quickbuf.ProtoSource input) throws IOException - Throws:
IOException
-
parseFrom
public static Wpimath.ProtobufMatrix parseFrom(us.hebi.quickbuf.JsonSource input) throws IOException - Throws:
IOException
-
getFactory
- Returns:
- factory for creating ProtobufMatrix messages
-
getDescriptor
- Returns:
- this type's descriptor.
-