Home > Mateda2.0 > otherfiles > FindAccCard.m

# FindAccCard

## PURPOSE

[AccCard] = FindAccCard(length,Card)

## SYNOPSIS

function [AccCard] = FindAccCard(length,Card)

## DESCRIPTION

     [AccCard] = FindAccCard(length,Card)

     FindAccCard:  Finds the accumulative cardinality of a set of variables
     whose cardinality is in Card.
     INPUT:
     length: length of the vector
     Card: Cardinality of the variables
     OUTPUT:
     AccCard: The product of cardinalities of previous  variables,
              where the first variable is  the first one to the left.

     Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- LearnFDAParameters [Tables] = LearnFDAParameters(Cliques,SelPop,NumbVar,Card)
- LearnMOAParameters [Tables] = LearnMOAParameters(Cliques,SelPop,NumbVar,Card)
- LearnMOAProb [Tables] = LearnMOAProb(Cliques,SelPop,NumbVar,N,Card)
- FindListCard [ListFactorsCard] = FindListCard(ListFactors,Card)
- FindListCliqAccCard [ListCliqAccCard] = FindListCliqAccCard(totcliq,ListCliques,Card)
- Find_kMPEs [k_solutions,k_probvalues] = Find_kMPEs(bnet,k,Card)
- MNGibbsGenerateIndividual [NewIndividual] = MOAGenerateIndividual(OldIndividual,Cliques,Tables,Card,GibbSteps)
- MOAGenerateIndividual [NewIndividual] = MOAGenerateIndividual(OldIndividual,Cliques,Tables,Card,GibbSteps)
- SampleFDA [NewPop] = SampleFDA(NumbVar,model,Card,AuxPop,AuxFunVal,sampling_params)

## SOURCE CODE

    0001 function [AccCard] = FindAccCard(length,Card)
    0002 % [AccCard] = FindAccCard(length,Card)
    0003 %
    0004 % FindAccCard:  Finds the accumulative cardinality of a set of variables
    0005 % whose cardinality is in Card.
    0006 % INPUT:
    0007 % length: length of the vector
    0008 % Card: Cardinality of the variables
    0009 % OUTPUT:
    0010 % AccCard: The product of cardinalities of previous  variables,
    0011 %          where the first variable is  the first one to the left.
    0012 %
    0013 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
    0014
    0015
    0016  AccCard(length) = 1;
    0017
    0018 for i=length-1:-1:1
    0019     AccCard(i)=AccCard(i+1)*Card(i+1);
    0020  end