MythTV  master
Macros | Variables
galleryviews.cpp File Reference
#include "galleryviews.h"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <iterator>
#include <random>
#include <vector>
#include "libmythbase/mythrandom.h"
Include dependency graph for galleryviews.cpp:

Go to the source code of this file.

Macros

#define LOC   QString("Galleryviews: ")
 

Variables

const static 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...
 
static constexpr qint64 BETA_CLIP { 24LL * 60 * 60 }
 The edges of the distribution get clipped to avoid a singularity. More...
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("Galleryviews: ")

Definition at line 12 of file galleryviews.cpp.

Variable Documentation

◆ kMaxFolderThumbnails

const static int kMaxFolderThumbnails = 4
static

Number of thumbnails to use for folders.

Definition at line 15 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 23 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 25 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)

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

Definition at line 28 of file galleryviews.cpp.

Referenced by FlatView::CalculateSeasonalWeights().

◆ BETA_CLIP

constexpr qint64 BETA_CLIP { 24LL * 60 * 60 }
staticconstexpr

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

Definition at line 31 of file galleryviews.cpp.

Referenced by FlatView::CalculateSeasonalWeights().

LEADING_BETA_SHAPE
const double LEADING_BETA_SHAPE
Tuning parameter for seasonal weights, between 0 and 1, where lower numbers give greater weight to se...
Definition: galleryviews.cpp:23
TRAILING_BETA_SHAPE
const double TRAILING_BETA_SHAPE
See LEADING_BETA_SHAPE.
Definition: galleryviews.cpp:25