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
-
Method Summary
Modifier and Type Method Description Wpimath.ProtobufMatrix
addAllData(double... values)
repeated double data = 3;
Wpimath.ProtobufMatrix
addData(double value)
repeated double data = 3;
Wpimath.ProtobufMatrix
clear()
Wpimath.ProtobufMatrix
clearData()
repeated double data = 3;
Wpimath.ProtobufMatrix
clearNumCols()
optional uint32 num_cols = 2;
Wpimath.ProtobufMatrix
clearNumRows()
optional uint32 num_rows = 1;
Wpimath.ProtobufMatrix
clearQuick()
Wpimath.ProtobufMatrix
clone()
protected int
computeSerializedSize()
Wpimath.ProtobufMatrix
copyFrom(Wpimath.ProtobufMatrix other)
boolean
equals(Object o)
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
getDescriptor()
static us.hebi.quickbuf.MessageFactory<Wpimath.ProtobufMatrix>
getFactory()
us.hebi.quickbuf.RepeatedDouble
getMutableData()
repeated double data = 3;
This method returns the internal storage object and sets the corresponding has state.int
getNumCols()
optional uint32 num_cols = 2;
int
getNumRows()
optional uint32 num_rows = 1;
boolean
hasData()
repeated double data = 3;
boolean
hasNumCols()
optional uint32 num_cols = 2;
boolean
hasNumRows()
optional uint32 num_rows = 1;
boolean
isEmpty()
Wpimath.ProtobufMatrix
mergeFrom(Wpimath.ProtobufMatrix other)
Wpimath.ProtobufMatrix
mergeFrom(us.hebi.quickbuf.JsonSource input)
Wpimath.ProtobufMatrix
mergeFrom(us.hebi.quickbuf.ProtoSource input)
static Wpimath.ProtobufMatrix
newInstance()
static Wpimath.ProtobufMatrix
parseFrom(byte[] data)
static Wpimath.ProtobufMatrix
parseFrom(us.hebi.quickbuf.JsonSource input)
static Wpimath.ProtobufMatrix
parseFrom(us.hebi.quickbuf.ProtoSource input)
Wpimath.ProtobufMatrix
setNumCols(int value)
optional uint32 num_cols = 2;
Wpimath.ProtobufMatrix
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.
-