MythTV  master
Macros | Variables
galleryviews.cpp File Reference
#include "galleryviews.h"
#include <cmath>
#include <random>
#include <QRandomGenerator>
Include dependency graph for galleryviews.cpp:

Go to the source code of this file.

Macros

#define LOC   QString("Galleryviews: ")
 

Variables

static const int kMaxFolderThumbnails = 4
 Number of thumbnails to use for folders. More...
 
const double LEADING_BETA_SHAPE = 0.175
 Tuning parameter for seasonal weights, between 0 and 1, where lower numbers give greater weight to seasonal photos. More...
 
const double TRAILING_BETA_SHAPE = 0.31
 See LEADING_BETA_SHAPE. More...
 
const double DEFAULT_WEIGHT
 Photos without an exif timestamp will default to the mode of the beta distribution. More...
 
const qint64 BETA_CLIP = 60 * 60 * 24
 The edges of the distribution get clipped to avoid a singularity. More...
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("Galleryviews: ")

Definition at line 9 of file galleryviews.cpp.

Variable Documentation

◆ kMaxFolderThumbnails

const int kMaxFolderThumbnails = 4
static

Number of thumbnails to use for folders.

Definition at line 12 of file galleryviews.cpp.

Referenced by DirectoryView::LoadFromDb(), and DirectoryView::PopulateThumbs().

◆ LEADING_BETA_SHAPE

const double LEADING_BETA_SHAPE = 0.175

Tuning parameter for seasonal weights, between 0 and 1, where lower numbers give greater weight to seasonal photos.

The leading beta shape controls dates that are approaching and the trailing beta shape controls dates that just passed. When these are set to 0.175 and 0.31, respectively, about one quarter of the photos are from the upcoming week in prior years and about one quarter of the photos are from the preceding month in prior years.

Definition at line 20 of file galleryviews.cpp.

Referenced by FlatView::CalculateSeasonalWeights().

◆ TRAILING_BETA_SHAPE

const double TRAILING_BETA_SHAPE = 0.31

See LEADING_BETA_SHAPE.

Definition at line 22 of file galleryviews.cpp.

Referenced by FlatView::CalculateSeasonalWeights().

◆ DEFAULT_WEIGHT

const double DEFAULT_WEIGHT
Initial value:
= std::pow(0.5, TRAILING_BETA_SHAPE - 1) *
std::pow(0.5, LEADING_BETA_SHAPE - 1)
const double LEADING_BETA_SHAPE
Tuning parameter for seasonal weights, between 0 and 1, where lower numbers give greater weight to se...
const double TRAILING_BETA_SHAPE
See LEADING_BETA_SHAPE.

Photos without an exif timestamp will default to the mode of the beta distribution.

Definition at line 25 of file galleryviews.cpp.

Referenced by FlatView::CalculateSeasonalWeights().

◆ BETA_CLIP

const qint64 BETA_CLIP = 60 * 60 * 24

The edges of the distribution get clipped to avoid a singularity.

Definition at line 28 of file galleryviews.cpp.

Referenced by FlatView::CalculateSeasonalWeights().