.TH "sc::SCElementOp" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::SCElementOp \- Objects of class \fBSCElementOp\fP are used to perform operations on the elements of matrices\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::SavableState\fP\&. .PP Inherited by \fBsc::BlockedSCElementOp\fP, \fBsc::OneBodyIntOp\fP, \fBsc::SCElementAccumulateDiagSCMatrix\fP, \fBsc::SCElementAccumulateSCMatrix\fP, \fBsc::SCElementAccumulateSCVector\fP, \fBsc::SCElementAccumulateSymmSCMatrix\fP, \fBsc::SCElementAssign\fP, \fBsc::SCElementDot\fP, \fBsc::SCElementInvert\fP, \fBsc::SCElementKNorm\fP, \fBsc::SCElementMaxAbs\fP, \fBsc::SCElementMinAbs\fP, \fBsc::SCElementRandomize\fP, \fBsc::SCElementScale\fP, \fBsc::SCElementScaleDiagonal\fP, \fBsc::SCElementShiftDiagonal\fP, \fBsc::SCElementSquareRoot\fP, and \fBsc::SCElementSumAbs\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSCElementOp\fP (\fBStateIn\fP &s)" .br .ti -1c .RI "virtual int \fBhas_collect\fP ()" .br .RI "If duplicates of the \fBSCElementOp\fP exist (that is, there is more than one node), then if has_collect returns nonzero then collect is called with a \fBMessageGrp\fP reference after all of the blocks have been processed\&. " .ti -1c .RI "virtual void \fBdefer_collect\fP (int)" .br .ti -1c .RI "virtual void \fBcollect\fP (const \fBRef\fP< \fBMessageGrp\fP > &)" .br .ti -1c .RI "virtual void \fBcollect\fP (const \fBRef\fP< \fBSCElementOp\fP > &)" .br .RI "Multithreaded use of cloneable \fBSCElementOp\fP objects requires that data from cloned objects be collected\&. " .ti -1c .RI "virtual int \fBhas_side_effects\fP ()" .br .RI "By default this returns nonzero\&. " .ti -1c .RI "virtual bool \fBthreadsafe\fP ()" .br .RI "Returns true if this \fBSCElementOp\fP is threadsafe\&. " .ti -1c .RI "virtual bool \fBcloneable\fP ()" .br .RI "Returns true if this \fBSCElementOp\fP supports the cloneable member\&. " .ti -1c .RI "virtual \fBRef\fP< \fBSCElementOp\fP > \fBclone\fP ()" .br .RI "Returns a clone of this object\&. " .ti -1c .RI "virtual void \fBprocess\fP (\fBSCMatrixBlockIter\fP &)=0" .br .RI "This is the fallback routine to process blocks and is called by process_spec members that are not overridden\&. " .ti -1c .RI "void \fBprocess_base\fP (\fBSCMatrixBlock\fP *block)" .br .RI "Lazy matrix implementors can call this member when the type of block specialization is unknown\&. " .ti -1c .RI "virtual void \fBprocess_spec_rect\fP (\fBSCMatrixRectBlock\fP *)" .br .RI "Matrices should call these members when the type of block is known\&. " .ti -1c .RI "virtual void \fBprocess_spec_ltri\fP (\fBSCMatrixLTriBlock\fP *)" .br .ti -1c .RI "virtual void \fBprocess_spec_diag\fP (\fBSCMatrixDiagBlock\fP *)" .br .ti -1c .RI "virtual void \fBprocess_spec_vsimp\fP (\fBSCVectorSimpleBlock\fP *)" .br .ti -1c .RI "virtual void \fBprocess_spec_rectsub\fP (\fBSCMatrixRectSubBlock\fP *)" .br .ti -1c .RI "virtual void \fBprocess_spec_ltrisub\fP (\fBSCMatrixLTriSubBlock\fP *)" .br .ti -1c .RI "virtual void \fBprocess_spec_diagsub\fP (\fBSCMatrixDiagSubBlock\fP *)" .br .ti -1c .RI "virtual void \fBprocess_spec_vsimpsub\fP (\fBSCVectorSimpleSubBlock\fP *)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP Objects of class \fBSCElementOp\fP are used to perform operations on the elements of matrices\&. When the \fBSCElementOp\fP object is given to the element_op member of a matrix, each block the matrix is passed to one of the process, process_base, or process_base members\&. .SH "Member Function Documentation" .PP .SS "virtual \fBRef\fP<\fBSCElementOp\fP> sc::SCElementOp::clone ()\fC [virtual]\fP" .PP Returns a clone of this object\&. This is needed for multithreaded use of \fBSCElementOp\fP objects that are not thread safe\&. The default implemenation throws an exception\&. .PP Reimplemented in \fBsc::OneBodyIntOp\fP\&. .SS "virtual bool sc::SCElementOp::cloneable ()\fC [virtual]\fP" .PP Returns true if this \fBSCElementOp\fP supports the cloneable member\&. The default implmentation returns false\&. .PP Reimplemented in \fBsc::OneBodyIntOp\fP\&. .SS "virtual void sc::SCElementOp::collect (const \fBRef\fP< \fBSCElementOp\fP > &)\fC [virtual]\fP" .PP Multithreaded use of cloneable \fBSCElementOp\fP objects requires that data from cloned objects be collected\&. The default implementation will throw an exception\&. .PP Reimplemented in \fBsc::SCElementKNorm\fP, \fBsc::SCElementSumAbs\fP, \fBsc::SCElementMinAbs\fP, \fBsc::SCElementMaxAbs\fP, and \fBsc::SCElementInvert\fP\&. .SS "virtual int sc::SCElementOp::has_collect ()\fC [virtual]\fP" .PP If duplicates of the \fBSCElementOp\fP exist (that is, there is more than one node), then if has_collect returns nonzero then collect is called with a \fBMessageGrp\fP reference after all of the blocks have been processed\&. The default return value of has_collect is 0 and collect's default action is do nothing\&. If defer_collect member is called with nonzero, collect will do nothing (this is only used by the blocked matrices)\&. .PP Reimplemented in \fBsc::SCElementKNorm\fP, \fBsc::SCElementSumAbs\fP, \fBsc::SCElementMinAbs\fP, \fBsc::SCElementMaxAbs\fP, and \fBsc::SCElementInvert\fP\&. .SS "virtual int sc::SCElementOp::has_side_effects ()\fC [virtual]\fP" .PP By default this returns nonzero\&. If the ElementOp specialization will change any elements of the matrix, then this must be overridden to return nonzero\&. .PP Reimplemented in \fBsc::SCElementAccumulateSCVector\fP, \fBsc::SCElementAccumulateDiagSCMatrix\fP, \fBsc::SCElementAccumulateSymmSCMatrix\fP, \fBsc::SCElementAccumulateSCMatrix\fP, \fBsc::SCElementDot\fP, \fBsc::SCElementShiftDiagonal\fP, \fBsc::SCElementScaleDiagonal\fP, \fBsc::SCElementInvert\fP, \fBsc::SCElementSquareRoot\fP, \fBsc::SCElementAssign\fP, \fBsc::SCElementRandomize\fP, \fBsc::SCElementScale\fP, \fBsc::LevelShift\fP, and \fBsc::OneBodyIntOp\fP\&. .SS "void sc::SCElementOp::process_base (\fBSCMatrixBlock\fP * block)" .PP Lazy matrix implementors can call this member when the type of block specialization is unknown\&. However, this will attempt to dynamic_cast block to a block specialization and will thus be less efficient\&. .SS "virtual void sc::SCElementOp::process_spec_rect (\fBSCMatrixRectBlock\fP *)\fC [virtual]\fP" .PP Matrices should call these members when the type of block is known\&. ElementOp specializations should override these when efficiency is important, since these give the most efficient access to the elements of the block\&. .PP Reimplemented in \fBsc::OneBodyIntOp\fP\&. .SS "virtual bool sc::SCElementOp::threadsafe ()\fC [virtual]\fP" .PP Returns true if this \fBSCElementOp\fP is threadsafe\&. The default implementation returns false\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.