28 #ifndef _math_scmat_elemop_h 29 #define _math_scmat_elemop_h 35 #include <util/state/state.h> 36 #include <util/group/message.h> 41 class SCMatrixBlockIter;
42 class SCMatrixRectBlock;
43 class SCMatrixLTriBlock;
44 class SCMatrixDiagBlock;
45 class SCVectorSimpleBlock;
46 class SCMatrixRectSubBlock;
47 class SCMatrixLTriSubBlock;
48 class SCMatrixDiagSubBlock;
49 class SCVectorSimpleSubBlock;
73 virtual void defer_collect(
int);
130 virtual int has_collect();
131 virtual void defer_collect(
int);
132 virtual int has_side_effects();
133 virtual int has_side_effects_in_arg();
152 virtual int has_collect();
153 virtual void defer_collect(
int);
154 virtual int has_side_effects();
155 virtual int has_side_effects_in_arg1();
156 virtual int has_side_effects_in_arg2();
187 void defer_collect(
int);
190 void init() { product = 0.0; }
199 int has_side_effects();
254 int nbelowthreshold_;
264 void defer_collect(
int);
267 int result() {
return nbelowthreshold_; }
273 double scale_diagonal;
285 double shift_diagonal;
306 void defer_collect(
int);
325 void defer_collect(
int);
343 void defer_collect(
int);
347 void init() { r = 0.0; }
364 void defer_collect(
int);
368 void init() { r_ = 0.0; }
int has_side_effects()
By default this returns nonzero.
int has_collect()
If duplicates of the SCElementOp exist (that is, there is more than one node), then if has_collect re...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
int has_side_effects()
By default this returns nonzero.
Computed k-norm of matrix.
Definition: elemop.h:351
int has_collect()
If duplicates of the SCElementOp exist (that is, there is more than one node), then if has_collect re...
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
int has_side_effects()
By default this returns nonzero.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
virtual bool cloneable()
Returns true if this SCElementOp supports the cloneable member.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
Serializes objects that derive from SavableState.
Definition: stateout.h:61
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
virtual void process_spec_rect(SCMatrixRectBlock *)
Matrices should call these members when the type of block is known.
int has_side_effects()
By default this returns nonzero.
The SCMatrix class is the abstract base class for general double valued n by m matrices.
Definition: abstract.h:195
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The SCMatrixRectBlock describes a rectangular piece of a matrix.
Definition: block.h:187
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
The SCVectorSimpleBlock describes a piece of a vector.
Definition: block.h:127
A template class that maintains references counts.
Definition: ref.h:332
SCMatrixBlock is the base clase for all types of blocks that comprise matrices and vectors...
Definition: block.h:45
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The SCMatrixRectSubBlock describes a rectangular piece of a matrix.
Definition: block.h:223
int has_side_effects()
By default this returns nonzero.
virtual Ref< SCElementOp > clone()
Returns a clone of this object.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
int has_collect()
If duplicates of the SCElementOp exist (that is, there is more than one node), then if has_collect re...
The SymmSCMatrix class is the abstract base class for diagonal double valued matrices.
Definition: abstract.h:503
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The SCMatrixDiagSubBlock describes a diagonal subblock of a matrix.
Definition: block.h:355
int has_side_effects()
By default this returns nonzero.
int has_side_effects()
By default this returns nonzero.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The SCVector class is the abstract base class for double valued vectors.
Definition: abstract.h:97
Restores objects that derive from SavableState.
Definition: statein.h:70
int has_side_effects()
By default this returns nonzero.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
The SCElementOp2 class is very similar to the SCElementOp class except that pairs of blocks are treat...
Definition: elemop.h:125
int has_collect()
If duplicates of the SCElementOp exist (that is, there is more than one node), then if has_collect re...
int has_side_effects()
By default this returns nonzero.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
The SCVectorSimpleSubBlock describes a subblock of a vector.
Definition: block.h:158
The SCMatrixLTriBlock describes a triangular piece of a matrix.
Definition: block.h:257
The SymmSCMatrix class is the abstract base class for symmetric double valued matrices.
Definition: abstract.h:364
SCElementKNorm(double k=2.0)
by default compute 2-norm
virtual void process(SCMatrixBlockIter &)=0
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
int has_side_effects()
By default this returns nonzero.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
int has_collect()
If duplicates of the SCElementOp exist (that is, there is more than one node), then if has_collect re...
virtual int has_collect()
If duplicates of the SCElementOp exist (that is, there is more than one node), then if has_collect re...
int has_side_effects()
By default this returns nonzero.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The SCElementOp3 class is very similar to the SCElementOp class except that a triplet of blocks is tr...
Definition: elemop.h:147
void process_base(SCMatrixBlock *block)
Lazy matrix implementors can call this member when the type of block specialization is unknown...
The SCMatrixLTriSubBlock describes a triangular subblock of a matrix.
Definition: block.h:292
virtual bool threadsafe()
Returns true if this SCElementOp is threadsafe.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
int has_side_effects()
By default this returns nonzero.
Objects of class SCElementOp are used to perform operations on the elements of matrices.
Definition: elemop.h:60
virtual int has_side_effects()
By default this returns nonzero.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Base class for objects that can save/restore state.
Definition: state.h:46
The SCMatrixBlockIter class is used to described iterates that loop through the elements in a block...
Definition: blkiter.h:50
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
The SCMatrixDiagBlock describes a diagonal piece of a matrix.
Definition: block.h:322