PLearn 0.1
Public Member Functions | Protected Attributes | Private Types
PLearn::SDBVMFieldHasClaim Class Reference

#include <SDBVMat.h>

Inheritance diagram for PLearn::SDBVMFieldHasClaim:
Inheritance graph
[legend]
Collaboration diagram for PLearn::SDBVMFieldHasClaim:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SDBVMFieldHasClaim (Schema schema)
virtual void convertField (const SDBWithStats &sdb, const Row &row, Vec &output) const
virtual int fieldWidth () const
 Width that the field occupies in the VMat.

Protected Attributes

FieldPtr bodily_injury_incurred_
FieldPtr property_damage_incurred_
FieldPtr accident_death_incurred_
FieldPtr collision_lou_incurred_
FieldPtr comprehensive_incurred_
FieldPtr roadstar_incurred_

Private Types

typedef SDBVMField inherited

Detailed Description

Definition at line 1030 of file SDBVMat.h.


Member Typedef Documentation

Definition at line 1032 of file SDBVMat.h.


Constructor & Destructor Documentation

PLearn::SDBVMFieldHasClaim::SDBVMFieldHasClaim ( Schema  schema) [inline]

Definition at line 1035 of file SDBVMat.h.

                                     :
        inherited(0),
        bodily_injury_incurred_(schema("bodily_injury_incurred")),
        property_damage_incurred_(schema("property_damage_incurred")),
        accident_death_incurred_(schema("accident_death_incurred")),
        collision_lou_incurred_(schema("collision_lou_incurred")),
        comprehensive_incurred_(schema("comprehensive_incurred")),
        roadstar_incurred_(schema("roadstar_incurred"))
    {}

Member Function Documentation

void PLearn::SDBVMFieldHasClaim::convertField ( const SDBWithStats sdb,
const Row row,
Vec output 
) const [virtual]

Definition at line 1177 of file SDBVMat.cc.

References a, accident_death_incurred_, b, PLearn::Row::bind(), bodily_injury_incurred_, c, collision_lou_incurred_, comprehensive_incurred_, PLearn::SDBVMField::convertMissing(), d, property_damage_incurred_, and roadstar_incurred_.

{
    real a,b,c,d,e,f;  
    a = real(row.bind(bodily_injury_incurred_).toDouble());
    b = real(row.bind(property_damage_incurred_).toDouble());
    c = real(row.bind(accident_death_incurred_).toDouble());
    d = real(row.bind(collision_lou_incurred_).toDouble());
    e = real(row.bind(comprehensive_incurred_).toDouble());
    f = real(row.bind(roadstar_incurred_).toDouble());
    output[0] = (a!=0) || (b!=0) || (c!=0) || (d!=0) || (e!=0) || (f!=0);
    // REPLACE MISSING VALUES BY ZEROS
    convertMissing(output);
}

Here is the call graph for this function:

virtual int PLearn::SDBVMFieldHasClaim::fieldWidth ( ) const [inline, virtual]

Width that the field occupies in the VMat.

Implements PLearn::SDBVMField.

Definition at line 1045 of file SDBVMat.h.

{ return 1;}

Member Data Documentation

Definition at line 1050 of file SDBVMat.h.

Referenced by convertField().

Definition at line 1048 of file SDBVMat.h.

Referenced by convertField().

Definition at line 1051 of file SDBVMat.h.

Referenced by convertField().

Definition at line 1052 of file SDBVMat.h.

Referenced by convertField().

Definition at line 1049 of file SDBVMat.h.

Referenced by convertField().

Definition at line 1053 of file SDBVMat.h.

Referenced by convertField().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines