Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92036701
cellInteraction.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 16, 20:01
Size
2 KB
Mime Type
text/x-c++
Expires
Mon, Nov 18, 20:01 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22366906
Attached To
R9411 tisue modeling
cellInteraction.hpp
View Options
#ifndef __CELL_INTERACTION_HPP__
#define __CELL_INTERACTION_HPP__
//#include <boost/numeric/odeint.hpp>
#include <iostream>
#include <boost/array.hpp>
#include <iterator>
#include "lattice.hpp"
#include "observer.hpp"
//template <class Observer>
class
CellInteraction
{
protected
:
Lattice
*
lattice
;
state_type
*
state
;
uint
state_dim
;
double
dead_cell_val
;
//Observer *observer;
struct
visitorParams
{
uint
*
cnt
;
CellInteraction
*
ci
;
visitorParams
(
uint
*
i
=
NULL
,
CellInteraction
*
c
=
NULL
){
cnt
=
i
;
ci
=
c
;}
};
struct
visitorParams2
{
state_type
*
state
;
CellInteraction
*
ci
;
visitorParams2
(
state_type
*
s
=
NULL
,
CellInteraction
*
c
=
NULL
){
state
=
s
;
ci
=
c
;}
};
public
:
CellInteraction
(){
setDefaultParameters
();}
virtual
~
CellInteraction
(){}
virtual
double
deadCellValue
(){
return
dead_cell_val
;}
virtual
void
setDefaultParameters
(){
dead_cell_val
=
-
1.0
;}
virtual
void
operator
()
(
const
state_type
&
y
,
state_type
&
dydt
,
const
double
t
){}
virtual
void
setLattice
(
Lattice
*
lat
){
lattice
=
lat
;
state_dim
=
setStateVectorIndex
();
state
->
resize
(
state_dim
);}
virtual
void
setState
(
state_type
*
s
){
state
=
s
;}
virtual
void
initState
(
state_type
&
s
){
state
=
&
s
;
initState
();}
virtual
void
initState
();
void
initState
(
state_type
&
state
,
double
*
signal
){}
virtual
void
updateDeadCellState
(
state_type
&
s
);
virtual
void
initCell
(
Cell
*
ce
,
state_type
*
state
);
virtual
void
initBoundary
(
Boundary
*
bo
,
state_type
*
state
);
virtual
void
fromState
(
const
state_type
&
state
){}
virtual
uint
cellStateDim
()
const
{
return
0
;}
virtual
uint
boundaryStateDim
()
const
{
return
0
;}
virtual
uint
extraCellStateDim
()
const
{
return
0
;}
virtual
uint
setStateVectorIndex
(
uint
start
=
0
);
//starts indexing at start
virtual
void
writeState
();
// virtual KeepLast& observeLast(){return observer;};
virtual
state_type
&
getState
(){
return
*
state
;}
virtual
void
updateSignal
(){}
virtual
void
updateSignal
(
const
state_type
&
y
){}
virtual
uint
getOutputNumber
()
const
{
return
0
;}
virtual
std
::
pair
<
int
,
int
>
getOutputSize
(
int
i
=
0
)
const
{
return
std
::
make_pair
(
0
,
0
);}
static
void
initCellState
(
Cell
*
ce
,
void
*
pt
);
static
void
initBoundaryState
(
Boundary
*
bo
,
void
*
pt
);
static
void
setEmptyCellValue
(
Cell
*
ce
,
void
*
pt
);
static
void
setCellIndex
(
Cell
*
ce
,
void
*
pt
);
static
void
setBoundaryIndex
(
Boundary
*
bo
,
void
*
pt
);
static
void
collectCellIdx
(
Cell
*
c
,
void
*
arg
);
virtual
double
delaminationScore
(
Boundary
*
bo
){
return
0.0
;}
virtual
void
fillVector
(
double
*
v
,
int
i
)
const
{}
virtual
float
getWeight
(
Boundary
*
b
,
const
state_type
&
y
){
return
1.0
;}
};
#endif
Event Timeline
Log In to Comment