Package dev.nm.misc
Interface DeepCopyable
-
- All Known Subinterfaces:
Matrix
,SparseMatrix
,Vector
- All Known Implementing Classes:
Basis
,BidiagonalMatrix
,BorderedHessian
,ColumnBindMatrix
,CombinedVectorByRef
,CongruentMatrix
,CorrelationMatrix
,CSRSparseMatrix
,DenseData
,DenseMatrix
,DenseVector
,DiagonalMatrix
,DiagonalSum
,DOKSparseMatrix
,FastKroneckerProduct
,Ft
,FtWt
,GivensMatrix
,GoldfeldQuandtTrotter
,Gradient
,Hessian
,HilbertMatrix
,ImmutableMatrix
,ImmutableVector
,Inverse
,Jacobian
,KroneckerProduct
,LILSparseMatrix
,LowerTriangularMatrix
,MAT
,MatrixRootByDiagonalization
,MatthewsDavies
,MultivariateFt
,MultivariateFtWt
,OuterProduct
,PermutationMatrix
,PositiveDefiniteMatrixByPositiveDiagonal
,PositiveSemiDefiniteMatrixNonNegativeDiagonal
,Pow
,PseudoInverse
,ReturnsMatrix
,SampleCovariance
,SimilarMatrix
,SparseVector
,SubMatrixRef
,SubVectorRef
,SVEC
,SymmetricKronecker
,SymmetricMatrix
,TridiagonalMatrix
,UpperTriangularMatrix
public interface DeepCopyable
This interface provides a way to do polymorphic copying. An interface (a class) that extends (implements) this interface should override the return type ofdeepCopy()
in the interface (class) itself to provide as much information as possible to avoid unnecessary casting. For example,public interface Matrix extends DeepCopyable { ... Matrix deepCopy(); }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
deepCopy()
The implementation returns an instance created fromthis
by the copy constructor of the class, or justthis
if the instance itself is immutable.
-
-
-
Method Detail
-
deepCopy
Object deepCopy()
The implementation returns an instance created fromthis
by the copy constructor of the class, or justthis
if the instance itself is immutable.- Returns:
- an independent (deep) copy of the instance
-
-