<commit_before>/*=========================================================================

Library:   TubeTK

Copyright 2010 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.

All rights reserved.

Licensed under the Apache License, Version 2.0 ( the "License" );
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

=========================================================================*/
#ifndef __itkTubeMetaLDA_h
#define __itkTubeMetaLDA_h

#include "metaTypes.h"

#include "vnl/vnl_vector.h"
#include "vnl/vnl_matrix.h"

#include "metaUtils.h"
#include "metaForm.h"

/*!    MetaLDA ( .h and .cpp )
*
* Description:
*    Reads and Writes MetaLDA Files, typically designated .mlda files
*
*    REQUIRED: itkTubeLDAGenerator instance
*
* \author <NAME>
*
* \date August 29, 1999
*
* Depends on:
*    MetaUtils.h
*    MetaForm.h*/

namespace itk {

namespace tube {

class METAIO_EXPORT MetaLDA
: public MetaForm
{
  /////
  //
  // PUBLIC
  //
  ////
public:

  typedef std::vector< double >   ValueListType;

  typedef vnl_vector< double >    LDAValuesType;

  typedef vnl_matrix< double >    LDAMatrixType;

  ////
  //
  // Constructors & Destructor
  //
  ////
  MetaLDA( void );

  MetaLDA( const char *_headerName );

  MetaLDA( const MetaLDA & _metaLDA );

  MetaLDA( const LDAValuesType & _ldaValues,
      const LDAMatrixType & _ldaMatrix,
      const ValueListType & _whitenMeans,
      const ValueListType & _whitenStdDevs );

  ~MetaLDA( void );

  virtual void  PrintInfo( void ) const;

  using MetaForm::CopyInfo;
  virtual void  CopyInfo( const MetaLDA & _lda );

  virtual void  Clear( void );

  virtual bool  InitializeEssential( const LDAValuesType & _ldaValues,
      const LDAMatrixType & _ldaMatrix, const ValueListType & _whitenMeans,
      const ValueListType & _whitenStdDevs );

  void  SetLDAValues( const LDAValuesType & _ldaValues );
  const LDAValuesType & GetLDAValues( void ) const;

  void  SetLDAMatrix( const LDAMatrixType & _ldaMatrix );
  const LDAMatrixType & GetLDAMatrix( void ) const;

  void  SetWhitenMeans( const ValueListType & _whitenMeans );
  const ValueListType & GetWhitenMeans( void ) const;

  void  SetWhitenStdDevs( const ValueListType & _whitenStdDevs );
  const ValueListType & GetWhitenStdDevs( void ) const;

  virtual bool CanRead( const char *_headerName=NULL ) const;
  virtual bool Read( const char *_headerName=NULL );
  virtual bool CanReadStream( METAIO_STREAM::ifstream * _stream ) const;
<commit_msg>COMP: Initialize function should not be virtual<commit_after>/*=========================================================================

Library:   TubeTK

Copyright 2010 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.

All rights reserved.

Licensed under the Apache License, Version 2.0 ( the "License" );
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

=========================================================================*/
#ifndef __itkTubeMetaLDA_h
#define __itkTubeMetaLDA_h

#include "metaTypes.h"

#include "vnl/vnl_vector.h"
#include "vnl/vnl_matrix.h"

#include "metaUtils.h"
#include "metaForm.h"

/*!    MetaLDA ( .h and .cpp )
*
* Description:
*    Reads and Writes MetaLDA Files, typically designated .mlda files
*
*    REQUIRED: itkTubeLDAGenerator instance
*
* \author <NAME>
*
* \date August 29, 1999
*
* Depends on:
*    MetaUtils.h
*    MetaForm.h*/

namespace itk {

namespace tube {

class METAIO_EXPORT MetaLDA
: public MetaForm
{
  /////
  //
  // PUBLIC
  //
  ////
public:

  typedef std::vector< double >   ValueListType;

  typedef vnl_vector< double >    LDAValuesType;

  typedef vnl_matrix< double >    LDAMatrixType;

  ////
  //
  // Constructors & Destructor
  //
  ////
  MetaLDA( void );

  MetaLDA( const char *_headerName );

  MetaLDA( const MetaLDA & _metaLDA );

  MetaLDA( const LDAValuesType & _ldaValues,
      const LDAMatrixType & _ldaMatrix,
      const ValueListType & _whitenMeans,
      const ValueListType & _whitenStdDevs );

  ~MetaLDA( void );

  virtual void  PrintInfo( void ) const;

  using MetaForm::CopyInfo;
  virtual void  CopyInfo( const MetaLDA & _lda );

  virtual void  Clear( void );

  bool  InitializeEssential( const LDAValuesType & _ldaValues,
      const LDAMatrixType & _ldaMatrix, const ValueListType & _whitenMeans,
      const ValueListType & _whitenStdDevs );

  void  SetLDAValues( const LDAValuesType & _ldaValues );
  const LDAValuesType & GetLDAValues( void ) const;

  void  SetLDAMatrix( const LDAMatrixType & _ldaMatrix );
  const LDAMatrixType & GetLDAMatrix( void ) const;

  void  SetWhitenMeans( const ValueListType & _whitenMeans );
  const ValueListType & GetWhitenMeans( void ) const;

  void  SetWhitenStdDevs( const ValueListType & _whitenStdDevs );
  const ValueListType & GetWhitenStdDevs( void ) const;

  virtual bool CanRead( const char *_headerName=NULL ) const;
  virtual bool Read( const char *_headerName=NULL );
  virtual bool CanReadStream( METAIO_STREAM::ifstream * _stream ) const;

{'fraction_non_alphanumeric': 0.13256533700137552, 'fraction_numerical': 0.007221458046767538, 'mean_word_length': 3.971794871794872, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1273055', 'n_tokens_mistral': 1929, 'n_tokens_neox': 1782, 'n_words': 561}