Returns the factors for the temperament.
191143
def getFactors(chart):
    
    
    factors = []
    
    # Asc sign
    asc = chart.getAngle(const.ASC)
    singleFactor(factors, chart, ASC_SIGN, asc.sign)
    
    # Asc ruler
    ascRulerID = essential.ruler(asc.sign)
    ascRuler = chart.getObject(ascRulerID)
    singleFactor(factors, chart, ASC_RULER, ascRuler)
    singleFactor(factors, chart, ASC_RULER_SIGN, ascRuler.sign)
    
    # Planets in House 1
    house1 = chart.getHouse(const.HOUSE1)
    planetsHouse1 = chart.objects.getObjectsInHouse(house1)
    for obj in planetsHouse1:
        singleFactor(factors, chart, HOUSE1_PLANETS_IN, obj)
        
    # Planets conjunct Asc
    planetsConjAsc = chart.objects.getObjectsAspecting(asc, [0])
    for obj in planetsConjAsc:
        # Ignore planets already in house 1
        if obj not in planetsHouse1:
            singleFactor(factors, chart, ASC_PLANETS_CONJ, obj)
            
    # Planets aspecting Asc cusp
    aspList = [60, 90, 120, 180]
    planetsAspAsc = chart.objects.getObjectsAspecting(asc, aspList)
    for obj in planetsAspAsc:
        aspect = aspects.aspectType(obj, asc, aspList)
        singleFactor(factors, chart, ASC_PLANETS_ASP, obj, aspect)
    
    # Moon sign and phase
    moon = chart.getObject(const.MOON)
    singleFactor(factors, chart, MOON_SIGN, moon.sign)
    singleFactor(factors, chart, MOON_PHASE, moon)
    
    # Moon dispositor
    moonRulerID = essential.ruler(moon.sign)
    moonRuler = chart.getObject(moonRulerID)
    moonFactor = singleFactor(factors, chart, MOON_DISPOSITOR_SIGN, moonRuler.sign)
    moonFactor['planetID'] = moonRulerID  # Append moon dispositor ID
    
    # Planets conjunct Moon
    planetsConjMoon = chart.objects.getObjectsAspecting(moon, [0])
    for obj in planetsConjMoon:
        singleFactor(factors, chart, MOON_PLANETS_CONJ, obj)
            
    # Planets aspecting Moon
    aspList = [60, 90, 120, 180]
    planetsAspMoon = chart.objects.getObjectsAspecting(moon, aspList)
    for obj in planetsAspMoon:
        aspect = aspects.aspectType(obj, moon, aspList)
        singleFactor(factors, chart, MOON_PLANETS_ASP, obj, aspect)
    
    # Sun season
    sun = chart.getObject(const.SUN)
    singleFactor(factors, chart, SUN_SEASON, sun)
    
    return factors
586092
def covar_rescaling_factor(C):
    
    n = C.shape[0]
    P = sp.eye(n) - sp.ones((n,n))/float(n)
    trPCP = sp.trace(sp.dot(P,sp.dot(C,P)))
    r = (n-1) / trPCP
    return r
677931
private function getFactors($number)
    {
        $factors = [];

        for ($i = 2; $number / $i >= $i; ++$i) {
            while (0 === $number % $i) {
                $factors[] = $i;
                $number /= $i;
            }
        }

        if (1 < $number) {
            $factors[] = $number;
        }

        return $factors;
    }
512700
public static DiscreteFactor getVariances(Collection<DiscreteFactor> featureFactors,
      int featureVariableNum) {
    DiscreteFactor means = getMeans(featureFactors, featureVariableNum);
    
    DiscreteFactor sumSquares = null;
    int numEntries = 0;
    for (DiscreteFactor featureFactor : featureFactors) {
      VariableNumMap nonFeatureVars = featureFactor.getVars().removeAll(featureVariableNum);
      numEntries += nonFeatureVars.getNumberOfPossibleAssignments();

      DiscreteFactor factorSumSquares = featureFactor.product(featureFactor)
          .marginalize(nonFeatureVars);
      if (sumSquares == null) {
        sumSquares = factorSumSquares;
      } else {
        sumSquares = sumSquares.add(factorSumSquares);
      }
    }
    
    return sumSquares.add(means.product(means).product(-1.0 * numEntries))
        .product(1.0 / numEntries);
  }
536095
def _linalg_cho_factor(A, rho, lower=False, check_finite=True):
    """"""

    N, M = A.shape
    if N >= M:
        c, lwr = _cho_factor(
            A.T.dot(A) + rho * cp.identity(M, dtype=A.dtype), lower=lower,
            check_finite=check_finite)
    else:
        c, lwr = _cho_factor(
            A.dot(A.T) + rho * cp.identity(N, dtype=A.dtype), lower=lower,
            check_finite=check_finite)
    return c, lwr
671444
public List<SectionCharacteristic> getCharacteristics() {
        long value = get(SectionHeaderKey.CHARACTERISTICS);
        List<SectionCharacteristic> list = SectionCharacteristic.getAllFor(value);
        assert list != null;
        return list;
    }
154720
protected BigRational getFactor(int index) {
		while (factors.size() <= index) {
			BigRational factor = getCurrentFactor();
			factors.add(factor);
			calculateNextFactor();
		}
		return factors.get(index);
	}
146422
def get_sensitivity(self, scalar=None):
        """"""
        # to get a Series instead of a dict:
        # (np.diag(c).astype(float) / c.T.sum())
        #     == pd.Series(self.sensitivity)
        if ((not self._scalar_stats and not scalar and self._num_classes > 2) or
                ((scalar is False or self._scalar_stats is False) and self._num_classes > 1)):
            return pd.Series(PrettyDict([(k, safe_div(self[k][k], self.loc[k].sum())) for k in self.columns]))
        return self._binary_sensitivity
1085184
public function factors()
    {
        $number = $this->value;
        $limit = floor(sqrt(abs($number)));
        $ret = array();
        for ($x = 1; $x <= $limit; $x++) {
            if ($number % $x == 0) {
                $other = intval($number / $x);
                $ret[$x] = $x;
                $ret[$other] = $other;
            }
        }
        ksort($ret);
        return array_values($ret);
    }
170394
def getSignalParameters(fitParams, n_std=3):
    '''
    
    '''
    signal = getSignalPeak(fitParams)
    mx = signal[1] + n_std * signal[2]
    mn = signal[1] - n_std * signal[2]
    if mn < fitParams[0][1]:
        mn = fitParams[0][1]  # set to bg
    return mn, signal[1], mx
189945
def _cho_factor(A, lower=True, check_finite=True):
    """"""

    return cp.linalg.cholesky(A), True
1327807
private double[][] assignPiFactors(IAtomContainerSet setAc) {
        //a,b,c,denom,chi,q
        double[][] gasteigerFactors = new double[setAc.getAtomContainerCount()][(setAc.getAtomContainer(0)
                .getAtomCount() * (STEP_SIZE + 1))];
        String AtomSymbol = "";
        double[] factors = new double[]{0.0, 0.0, 0.0};
        for (int k = 1; k < setAc.getAtomContainerCount(); k++) {
            IAtomContainer ac = setAc.getAtomContainer(k);
            for (int i = 0; i < ac.getAtomCount(); i++) {
                factors[0] = 0.0;
                factors[1] = 0.0;
                factors[2] = 0.0;
                AtomSymbol = ac.getAtom(i).getSymbol();
                if (AtomSymbol.equals("H")) {
                    factors[0] = 0.0;
                    factors[1] = 0.0;
                    factors[2] = 0.0;
                } else if (AtomSymbol.equals("C")) {/*
                                                     * if(ac.getAtom(i).getFlag(
                                                     * ISCHANGEDFC))
                                                     */
                    {
                        factors[0] = 5.60;
                        factors[1] = 8.93;
                        factors[2] = 2.94;
                    }
                } else if (AtomSymbol.equals("O")) {
                    if (ac.getMaximumBondOrder(ac.getAtom(i)) == IBond.Order.SINGLE) {
                        factors[0] = 10.0;
                        factors[1] = 13.86;
                        factors[2] = 9.68;
                    } else {
                        factors[0] = 7.91;
                        factors[1] = 14.76;
                        factors[2] = 6.85;
                    }
                } else if (AtomSymbol.equals("N")) {
                    if (ac.getMaximumBondOrder(ac.getAtom(i)) != IBond.Order.SINGLE) {
                        factors[0] = 7.95;/* 7.95 */
                        factors[1] = 9.73;/* 9.73 */
                        factors[2] = 2.67;/* 2.67 */
                    } else {
                        factors[0] = 4.54;/* 4.54 *//* 5.5 */
                        factors[1] = 11.86;/* 11.86 *//* 10.86 */
                        factors[2] = 7.32;/* 7.32 *//* 7.99 */
                    }
                } else if (AtomSymbol.equals("S")) {
                    if (ac.getMaximumBondOrder(ac.getAtom(i)) == IBond.Order.SINGLE) {
                        factors[0] = 7.73;
                        factors[1] = 8.16;
                        factors[2] = 1.81;
                    } else {
                        factors[0] = 6.60;
                        factors[1] = 10.32;
                        factors[2] = 3.72;
                    }
                } else if (AtomSymbol.equals("F")) {
                    factors[0] = 7.34;
                    factors[1] = 13.86;
                    factors[2] = 9.68;
                } else if (AtomSymbol.equals("Cl")) {
                    factors[0] = 6.50;
                    factors[1] = 11.02;
                    factors[2] = 4.52;
                } else if (AtomSymbol.equals("Br")) {
                    factors[0] = 5.20;
                    factors[1] = 9.68;
                    factors[2] = 4.48;
                } else if (AtomSymbol.equals("I")) {
                    factors[0] = 4.95;
                    factors[1] = 8.81;
                    factors[2] = 3.86;
                }

                gasteigerFactors[k][STEP_SIZE * i + i] = factors[0];
                gasteigerFactors[k][STEP_SIZE * i + i + 1] = factors[1];
                gasteigerFactors[k][STEP_SIZE * i + i + 2] = factors[2];
                gasteigerFactors[k][STEP_SIZE * i + i + 5] = ac.getAtom(i).getCharge();

                if (factors[0] == 0 && factors[1] == 0 && factors[2] == 0) {
                    gasteigerFactors[k][STEP_SIZE * i + i + 3] = 1;
                } else {
                    gasteigerFactors[k][STEP_SIZE * i + i + 3] = factors[0] + factors[1] + factors[2];
                }
            }
        }

        return gasteigerFactors;
    }
917103
public static FactorGraph createFromFactors(List<Factor> factors) {
    VariableNumMap allVars = VariableNumMap.EMPTY;
    for (int i = 0; i < factors.size(); i++) {
      allVars = allVars.union(factors.get(i).getVars());
    }

    String[] factorNames = new String[factors.size()];
    for (int i = 0; i < factors.size(); i++) {
      factorNames[i] = "factor-" + i;
    }
    return new FactorGraph(allVars, factors.toArray(new Factor[factors.size()]), factorNames,
        VariableNumMap.EMPTY, Assignment.EMPTY, null);
  }
379038
def fixed_values(self):
        
        values = []
        values.extend([ prefix_factor(param) * param['value'] for param in self.fixed_parameters ])
        values.extend([ prefix_factor(const) * get_constant(const['value']) for const in self.constants ])

        return tuple(values)
612970
private List<Token> convertFactor(final Token.Factor factor) {
        
        final String item = factor.getValue();
        final int itemLength = item.length();
        
        final List<Token> list = new ArrayList<>();
        
        int idx = 0;
        StringBuilder noTermChar = new StringBuilder(); // フォーマット以外の文字列を積む。
        while(idx < itemLength) {
            
            String matchChars = null;
            for(String chars : SORTED_DATE_CHARS) {
                if(Utils.startsWithIgnoreCase(item, chars, idx)) {
                    matchChars = item.substring(idx, idx + chars.length());
                    break;
                }
            }
            
            if(matchChars == null) {
                // フォーマットでない場合は、文字列としてバッファに追加する。
                noTermChar.append(item.charAt(idx));
                idx++;
            } else {
                if(noTermChar.length() > 0) {
                    // 今まで積んだバッファを、文字列として分割する。
                    list.add(Token.factor(noTermChar.toString()));
                    noTermChar = new StringBuilder();
                }
                
                list.add(Token.formatter(matchChars));
                idx += matchChars.length();
                
            }
        }
        
        if(noTermChar.length() > 0) {
            list.add(Token.factor(noTermChar.toString()));
        }
        
        return list;
    }
971739
protected function getFactors() {
        if (!$this->_factors) {
            $this->_factors = new FactorList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['identity']
            );
        }

        return $this->_factors;
    }
558910
def priorfactors(self):
        
        priorfactors = {}
        for pop in self.poplist:
            for f in pop.priorfactors:
                if f in priorfactors:
                    if pop.priorfactors[f] != priorfactors[f]:
                        raise ValueError('prior factor %s is inconsistent!' % f)
                else:
                    priorfactors[f] = pop.priorfactors[f]
        return priorfactors