本文整理汇总了C++中MatrixView::rowCount方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixView::rowCount方法的具体用法?C++ MatrixView::rowCount怎么用?C++ MatrixView::rowCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MatrixView
的用法示例。
在下文中一共展示了MatrixView::rowCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CombCPPSizing
//##ModelId=40A1898902EF
bool LoadBasedScreen1::CalculateModel( PFlowStream1 FeedStream )
{
// Local Variables
int i = 0;
int j = 0;
double ScaleFactor = 0.00;
double Denom = 0.00;
Vector CombCPPSizing ( nSize );
CubicSpline FeedSpline;
MatrixView FeedSolids = FeedStream->AccessSolidsMatrix( );
MatrixView OversizeSolids = Oversize->AccessSolidsMatrix( );
MatrixView UndersizeSolids = Undersize->AccessSolidsMatrix( );
// Ensure correct shape feed matrix
if( FeedSolids.rowCount() != nSize )
goto calcFailed;
if( FeedSolids.columnCount() != nType )
goto calcFailed;
// Calculate total feed flow rate (solids)
QF = FeedSolids.sum( );
// Convert feed matrix into single component size distribution
for( i = 0; i < nSize; i++ )
CombRetSizing[ i ] = (FeedSolids.row(i)).sum();
if (fabs(QF)<1e-8)
ScaleFactor = 0.00;
else
ScaleFactor = 1/QF;
// Scale single component distribution to cumulative sizing
// scaled to fraction basis: ie. 1 passes top-size
CombCPPSizing[ nSize - 1 ] = 0;
for( i = nSize - 2; i >=0; i-- )
CombCPPSizing[ i ] = CombCPPSizing[i + 1] + ( CombRetSizing[i + 1] * ScaleFactor );
// Construct cubic spline passing through cumulative curve
FeedSpline.SetSpline( Sizes, CombCPPSizing );
// Use cubic spline to get fraction passing half apperture size
Feed_HS = FeedSpline.CalculateY( S/2 );
// Use spline to get fraction passing apperture size
U = Feed_US = FeedSpline.CalculateY( S );
Feed_OS = 1 - Feed_US;
// Calculate area factors for this screen
A = CalculateA( S );
B = CalculateB( Feed_OS );
C = CalculateC( Feed_HS );
D = CalculateD( DL );
E = CalculateE( WS, S );
H = CalculateH( OT );
J = CalculateJ( ST, S, OA );
K = CalculateK( FT );
L = CalculateL();
X = CalculateX( CF );
// Calculate denominator of load equation - ensure not zero
Denom = A * B * C * D * E * F * H * J * K * L * AF * X;
if (fabs(Denom)<1e-8)
Denom = 1e-8;
// Calculate load
V = ( 90 * QF * U ) / ( Denom );
// Calculate efficiency that matches this load
T = CalculateT( V );
// Calculate factor G
G = ( V * T ) / 90;
// calculate flow to undersize at this efficiency
QU = QF * U * T;
// Solve for D50 that matches the undersize flow
D50 = zbrent( S * 0.1, S * 0.99, TOLERANCE );
// Calculate splitting of feed water to products
//.........这里部分代码省略.........